From 3a499532f3e666d9fe6cd94d770f019825b082f2 Mon Sep 17 00:00:00 2001 From: Reactorcoremeltdown Date: Fri, 30 Oct 2026 10:49:46 +0100 Subject: [PATCH] Make the deploy stamp the version and fire on Go changes Two things in the deploy did not do what they looked like: build-server passed --build-arg APP_VERSION, but the Dockerfile declares ARG VERSION. An unknown build arg is ignored with a warning, so every deployed image was stamped "dev": `keeporgd -version` and the image's version label both said so, whatever the tag claimed. The build pipeline's path filter listed 'VERSION', a file this repository does not have, and '*.go', which under doublestar matches only top-level Go files, of which there are none. So a push that changed only Go code or only the version did not trigger a build. Now versions.mk and '**/*.go'. Proved: built with --build-arg VERSION=0.5.0 and ran -version in the container, which now reports 0.5.0. --- .woodpecker/build.yaml | 4 ++-- Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index d6e3ffa..b048ed9 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -5,9 +5,9 @@ when: - 'config/variables/server.values.yaml' - '.woodpecker/build.yaml' - 'Makefile' - - 'VERSION' + - 'versions.mk' - 'Dockerfile' - - '*.go' + - '**/*.go' event: push labels: role: production diff --git a/Makefile b/Makefile index dbd26aa..4231eb0 100644 --- a/Makefile +++ b/Makefile @@ -240,7 +240,7 @@ nginx: build-server: nginx podman build \ - --build-arg APP_VERSION=${VERSION_SERVER} \ + --build-arg VERSION=${VERSION_SERVER} \ --platform=linux/arm64 \ -t repo.rcmd.space/$(APP_NAME):$(VERSION_SERVER) \ .