fix: fix quotes, do not execute scan during push
This commit is contained in:
parent
d2b10dd30b
commit
2c69869deb
@ -26,7 +26,7 @@ scan: build
|
|||||||
@echo "Scanning $(IMAGE):$(TAG) using Trivy"
|
@echo "Scanning $(IMAGE):$(TAG) using Trivy"
|
||||||
@trivy $(TRIVY_OPTS) $(IMAGE):$(TAG)
|
@trivy $(TRIVY_OPTS) $(IMAGE):$(TAG)
|
||||||
|
|
||||||
push: scan
|
push: build
|
||||||
@aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
|
@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 tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):latest
|
||||||
docker push $(REGISTRY)/$(IMAGE):$(TAG)
|
docker push $(REGISTRY)/$(IMAGE):$(TAG)
|
||||||
|
@ -49,7 +49,7 @@ def call(Map config=[:]) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
// Scan again and fail on CRITICAL vulns
|
// 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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user