From 2c69869deb654b5a10a950a151539c050f06acb9 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Mon, 14 Feb 2022 13:35:13 +0100 Subject: [PATCH] fix: fix quotes, do not execute scan during push --- podman.mk | 2 +- vars/buildPodman.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/podman.mk b/podman.mk index fb68db68..6f2bdcd2 100644 --- a/podman.mk +++ b/podman.mk @@ -26,7 +26,7 @@ scan: build @echo "Scanning $(IMAGE):$(TAG) using Trivy" @trivy $(TRIVY_OPTS) $(IMAGE):$(TAG) -push: scan +push: build @aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY) @docker tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):latest docker push $(REGISTRY)/$(IMAGE):$(TAG) diff --git a/vars/buildPodman.groovy b/vars/buildPodman.groovy index 99bfd08c..8479c1df 100644 --- a/vars/buildPodman.groovy +++ b/vars/buildPodman.groovy @@ -49,7 +49,7 @@ def call(Map config=[:]) { ] // Scan again and fail on CRITICAL vulns - sh '[ "${config.trivyFail}" == "NONE" ] || TRIVY_EXIT_CODE=1 TRIVY_SEVERITY=${config.trivyFail} make scan' + sh "[ \"${config.trivyFail}\" == \"NONE\" ] || TRIVY_EXIT_CODE=1 TRIVY_SEVERITY=${config.trivyFail} make scan" } }