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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user