Skip to content

Commit cce4938

Browse files
Fix Makefile deploy: no need for looping (#225)
* Fix Makefile deploy: no need for looping Signed-off-by: Victoria Miltcheva <[email protected]> * Remove unnecessary ; Signed-off-by: Victoria Miltcheva <[email protected]> * Store image name in var Signed-off-by: Victoria Miltcheva <[email protected]> * Clean up Signed-off-by: Victoria Miltcheva <[email protected]> * More clean up Signed-off-by: Victoria Miltcheva <[email protected]> * Refactor Signed-off-by: Victoria Miltcheva <[email protected]> --------- Signed-off-by: Victoria Miltcheva <[email protected]>
1 parent 5333dab commit cce4938

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ VERSION ?= dev
4747
DOCKER_REGISTRY_ICR := icr.io
4848
DOCKER_USER_ICR := iamapikey
4949
DOCKER_PASS_ICR := $(IBM_CLOUD_API_KEY)
50+
DOCKER_IMAGE_NAME := $(DOCKER_REGISTRY_ICR)/git-defenders/detect-secrets-stream
5051

5152
# Trivy related
5253
TRIVY ?= trivy
@@ -198,13 +199,11 @@ quality-images:
198199

199200
.PHONY: deploy
200201
deploy:
201-
skaffold build; \
202-
for image in $(shell skaffold build -q --dry-run | jq -r .builds[].tag); do \
203-
@echo "Signing image" ${image}"; \
204-
$(COSIGN) sign --key env://COSIGN_PRIVATE_KEY --yes $${image}; \
205-
@echo "Verifying image ${image}; \
206-
$(COSIGN) verify --key env://COSIGN_PUBLIC_KEY $${image}; \
207-
done; \
202+
skaffold build
203+
@echo "Signing image $(DOCKER_IMAGE_NAME)"
204+
$(COSIGN) sign --key env://COSIGN_PRIVATE_KEY --yes $(DOCKER_IMAGE_NAME)
205+
@echo "Verifying image $(DOCKER_IMAGE_NAME)"
206+
$(COSIGN) verify --key env://COSIGN_PUBLIC_KEY $(DOCKER_IMAGE_NAME)
208207

209208
.PHONY: clean
210209
clean:

0 commit comments

Comments
 (0)