docker-alpine-android/Makefile

30 lines
808 B
Makefile
Raw Permalink Normal View History

2021-01-06 01:07:02 +01:00
dcmd = docker
dfile = Dockerfile
dtag = immawanderer/alpine-android:testbuild
dargs = build -t $(dtag) --no-cache --pull .
cleanargs = image rm -f $(dtag)
pruneargs = system prune -af
dargskaniko = run --rm -it -w=$(kanikowdir) -v $$PWD:$(kanikowdir)
kanikoexecutorimg = gcr.io/kaniko-project/executor:v1.8.0-debug
2021-01-06 01:07:02 +01:00
kanikowdir = /src
kanikocontext = .
2022-04-01 21:07:59 +02:00
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")
2021-01-06 01:07:02 +01:00
.PHONY: build kaniko clean test prune
kaniko:
$(dcmd) $(dargskaniko) $(kanikoexecutorimg) $(kanikoargs)
build:
$(dcmd) $(dargs)
clean:
$(dcmd) $(cleanargs)
test: build kaniko
prune:
$(dcmd) $(pruneargs)