fix(kaniko): supply build args {in ci,locally}
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8c2b65c4cd
commit
af99fa3f7c
@ -29,6 +29,9 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
args:
|
||||||
|
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
|
||||||
|
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- "refs/heads/feature-**"
|
- "refs/heads/feature-**"
|
||||||
@ -43,6 +46,9 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
args:
|
||||||
|
- BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
|
||||||
|
- VCS_REF=${DRONE_COMMIT_SHA:0:7}
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- linux-amd64
|
- linux-amd64
|
||||||
|
4
Makefile
4
Makefile
@ -8,7 +8,9 @@ dargskaniko = run --rm -it -w=$(kanikowdir) -v $$PWD:$(kanikowdir)
|
|||||||
kanikoexecutorimg = gcr.io/kaniko-project/executor:v1.7.0-debug
|
kanikoexecutorimg = gcr.io/kaniko-project/executor:v1.7.0-debug
|
||||||
kanikowdir = /src
|
kanikowdir = /src
|
||||||
kanikocontext = .
|
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
|
.PHONY: build kaniko clean test prune
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user