feat: add Makefile

This commit is contained in:
surtur 2021-01-20 09:47:19 +01:00
parent 67d05a38bb
commit 53e16dead4
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

27
Makefile Normal file

@ -0,0 +1,27 @@
dcmd = docker
dfile = Dockerfile
dtag = immawanderer/alpine-rsync:testbuild
dargs = build -t $(dtag) --no-cache --pull - < $(dfile)
cleanargs = image rm -f $(dtag)
pruneargs = system prune -af
dargskaniko = run --rm -it -w=$(kanikowdir) -v $$PWD:$(kanikowdir)
kanikoexecutorimg = gcr.io/kaniko-project/executor
kanikowdir = /src
kanikocontext = .
kanikoargs = -f=$(dfile) -c=$(kanikocontext) --use-new-run --snapshotMode=redo --no-push
.PHONY: build kaniko clean test prune
kaniko:
$(dcmd) $(dargskaniko) $(kanikoexecutorimg) $(kanikoargs)
build:
$(dcmd) $(dargs)
clean:
$(dcmd) $(cleanargs)
test: build kaniko
prune:
$(dcmd) $(pruneargs)