-
Reliably Fetching Git Tags in GitLab Pipelines (and the GIT_DEPTH Pitfall)
Finding the right version string in a CI/CD pipeline can be surprisingly tricky. If you’ve been searching for a way to grab the “latest” tag in your GitLab runner, you’ve likely stumbled across this specific combination of Git commands. At least I did… Here is a breakdown of what that command does, why it works, and the “gotchas” you need to look out for. The Command Breakdown The command is actually two Git commands nested together: 1. The Inner Command: git rev-list The part inside the parenthesis, git rev-list --tags --max-count=1, acts as a locator. 2. The Outer Command: git describe Once the inner command finds the “hash” (the unique…
-
HTTPS Setup für eine Flask Anwendung – Teil 2
Im ersten Teil habe ich die Einrichtung des Ubuntu Servers für meine kleine Webanwendung für den isländisch Kurs beschrieben. Im zweiten Teil möchte ich kurz auf die HTTPS Einrichtung eingehen. Die DigitalOcean Anleitung für Ubuntu 18.04 funktioniert nicht unter Ubunt 20.x. Bitte darauf achren, die Anleitung für das eingesetzte Ubuntu Release (hier 20.04) zu verwenden, falls vorhanden. Das verwendete Repository ppa:certbot/certbot ist im Status DEPRECATED. Daher wird der Certbot für die Let’s Encrypt Zertifikate Ein Apache Virtual Host ist Vorausssetzung für die nächsten Schritte. Die Einrichtung habe ich in Teil 1 beschrieben. HTTPS Zugriff durch die Firewall Der aktuelle Status der Firewall wird mit ufw abgefragt: Um eingehende HTTPS Anfragen…
-
Ein sehr gutes Modell für GIT Branching & Merging
Für mich persönlich hat sich das von Vincent Driessen beschriebene Branching Modell im Bereich der Software Entwicklung als sehr nützlich erwiesen. Er beschreibt es hier: A successful Git branching model Mit diesem Modell kann sehr flexibel auf die verschiedneen Anforderungen, wie – Neue Releases (Major und Minor Releases) – Arbeiten an neuen Features – Hotfixes parallel zu den Releases auch in größeren Teams reagiert werden. Wenn es darum geht, mehr oder wenig fertig angelieferte Softwareartefakte mit Hilfe eines Git/Gitlab Projekts zu deployen und konfigurieren, weiche ich allerdings oft davon ab. In diesem Fall ist oft ein Branching Konzept Branch = Stage) sinnvoll. Alsi ein Branch Dev für die Entwicklungssysteme, ein…