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:
+7
-1
@@ -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 .
|
||||
|
||||
Reference in New Issue
Block a user