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