ci: more Makefile tweaks

This commit is contained in:
Stefan Reimer 2022-01-13 16:53:54 +01:00
parent f863a07291
commit ddf17bb520

View File

@ -4,6 +4,12 @@ REGISTRY := public.ecr.aws/zero-downtime
REPOSITORY := jenkins-podman REPOSITORY := jenkins-podman
TAG := $(REPOSITORY):v$(VERSION) TAG := $(REPOSITORY):v$(VERSION)
ifeq ($(TRIVY_REMOTE),)
TRIVY_OPTS := image
else
TRIVY_OPTS := client --remote ${TRIVY_REMOTE}
endif
.PHONY: build push clean scan .PHONY: build push clean scan
all: build all: build
@ -21,4 +27,4 @@ clean:
scan: scan:
[ -f image.tar ] || podman save $(TAG) -o image.tar [ -f image.tar ] || podman save $(TAG) -o image.tar
trivy image --input image.tar trivy $(TRIVY_OPTS) --input image.tar