From ddf17bb5206b76f06bf7d29c4200149e7c2cd858 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Thu, 13 Jan 2022 16:53:54 +0100 Subject: [PATCH] ci: more Makefile tweaks --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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