Merged in feature/log-version (pull request #185)

inject and print version at startup for all services

* inject and print version

* coverage
This commit is contained in:
Jay Brown
2025-09-18 21:06:21 +00:00
parent 8a13b6d3b1
commit a6e081e5cd
17 changed files with 233 additions and 5 deletions
+7 -1
View File
@@ -5,8 +5,12 @@ version: "3"
vars:
DOCKERFILE: "build/Dockerfile"
BUILD_TIME:
sh: date -u +"%Y-%m-%dT%H:%M:%SZ"
GIT_SHORT_COMMIT:
sh: git rev-parse --short HEAD
GIT_VERSION:
sh: git describe --tags --always
sh: echo "$(date -u +"%Y%m%d.%H%M%S")-$(git rev-parse --short HEAD)"
GIT_COMMIT:
sh: git rev-parse HEAD
@@ -21,6 +25,7 @@ tasks:
docker build \
--build-arg "GIT_VERSION={{.GIT_VERSION}}" \
--build-arg "GIT_COMMIT={{.GIT_COMMIT}}" \
--build-arg "BUILD_TIME={{.BUILD_TIME}}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
-t {{.IMAGE_NAME}}:latest \
-t {{.IMAGE_NAME}}:{{.GIT_VERSION}} \
@@ -32,5 +37,6 @@ tasks:
docker build \
--build-arg "GIT_VERSION={{.GIT_VERSION}}" \
--build-arg "GIT_COMMIT={{.GIT_COMMIT}}" \
--build-arg "BUILD_TIME={{.BUILD_TIME}}" \
-t {{.IMAGE_NAME}}:debug \
-f build/Dockerfile.debug .