Squashed '.ci/' changes from cb5faca..a47929d
a47929d feat: switch to latest trivy cli syntax git-subtree-dir: .ci git-subtree-split: a47929da1c1cb926f444766d592e24910122fc0e
This commit is contained in:
parent
c69ea98418
commit
43063d1ffa
@ -4,10 +4,8 @@ TAG ?= $(shell echo $(GTAG) | awk -F '-' '{ print $$1 "-" $$2 }' | sed -e 's/-$$
|
||||
|
||||
# EXTRA_TAGS supposed to be set at the caller, eg. $(shell echo $(TAG) | awk -F '.' '{ print $$1 "." $$2 }')
|
||||
|
||||
ifeq ($(TRIVY_REMOTE),)
|
||||
TRIVY_OPTS := image
|
||||
else
|
||||
TRIVY_OPTS := client --remote ${TRIVY_REMOTE}
|
||||
ifneq ($(TRIVY_REMOTE),)
|
||||
TRIVY_OPTS := --server ${TRIVY_REMOTE}
|
||||
endif
|
||||
|
||||
.PHONY: build test scan push clean
|
||||
@ -26,7 +24,7 @@ test: build rm-test-image
|
||||
|
||||
scan: build
|
||||
@echo "Scanning $(REGISTRY)/$(IMAGE):$(TAG) using Trivy"
|
||||
@trivy $(TRIVY_OPTS) $(REGISTRY)/$(IMAGE):$(TAG)
|
||||
@trivy image $(TRIVY_OPTS) $(REGISTRY)/$(IMAGE):$(TAG)
|
||||
|
||||
push: build
|
||||
@aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
|
||||
|
Loading…
Reference in New Issue
Block a user