fix(kaniko): supply build args {in ci,locally}
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2021-10-21 01:12:20 +02:00
parent 8c2b65c4cd
commit af99fa3f7c
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 9 additions and 1 deletions

View File

@ -29,6 +29,9 @@ steps:
settings:
dockerfile: Dockerfile
context: .
args:
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
when:
ref:
- "refs/heads/feature-**"
@ -43,6 +46,9 @@ steps:
settings:
dockerfile: Dockerfile
context: .
args:
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
tags:
- latest
- linux-amd64

View File

@ -8,7 +8,9 @@ dargskaniko = run --rm -it -w=$(kanikowdir) -v $$PWD:$(kanikowdir)
kanikoexecutorimg = gcr.io/kaniko-project/executor:v1.7.0-debug
kanikowdir = /src
kanikocontext = .
kanikoargs = -f=$(dfile) -c=$(kanikocontext) --use-new-run --snapshotMode=redo --no-push
kanikoargs = -f=$(dfile) -c=$(kanikocontext) --use-new-run --snapshotMode=redo --build-arg BUILD_DATE=$(build_date) --build-arg VCS_REF=$(vcs_ref) --no-push
vcs_ref = $$(git rev-parse --short HEAD)
build_date= $$(date -u +"%Y-%m-%dT%H:%M:%SZ")
.PHONY: build kaniko clean test prune