Skip to content

Commit

Permalink
debug: export SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
puffitos committed Sep 25, 2023
1 parent 9f94733 commit 56a1b54
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ test-busybox-images:
@k3d image import k3d-registry.localhost:5000/busybox:latest --cluster cosign-tests
@k3d image import k3d-registry.localhost:5000/busybox:second --cluster cosign-tests


test-image:
@echo "Checking for cosign.key..."
@test -f cosign.key || (echo "cosign.key not found. Run 'make generate-key' to generate one." && exit 1)
Expand All @@ -35,16 +34,15 @@ test-image:
@echo "Pushing test image..."
@docker push k3d-registry.localhost:5000/cosignwebhook:dev
@echo "Signing test image..."
@SHA=$(shell docker inspect --format='{{index .RepoDigests 0}}' k3d-registry.localhost:5000/cosignwebhook:dev | cut -d '@' -f 2) && \
echo "Using image SHA: $${SHA}" && \
@export SHA=$(shell docker inspect --format='{{index .RepoDigests 0}}' k3d-registry.localhost:5000/cosignwebhook:dev | cut -d '@' -f 2) && \
export COSIGN_PASSWORD="" && \
cosign sign --tlog-upload=false --key cosign.key k3d-registry.localhost:5000/cosignwebhook:dev@$${SHA}
@echo "Importing test image to cluster..."
@k3d image import k3d-registry.localhost:5000/cosignwebhook:dev --cluster cosign-tests

test-deploy:
@echo "Deploying test image..."
@SHA=$(shell docker inspect --format='{{index .RepoDigests 0}}' k3d-registry.localhost:5000/cosignwebhook:dev | cut -d '@' -f 2) && \
@export SHA=$(shell docker inspect --format='{{index .RepoDigests 0}}' k3d-registry.localhost:5000/cosignwebhook:dev | cut -d '@' -f 2) && \
echo "Using image SHA: $${SHA}" && \
helm upgrade -i cosignwebhook chart -n cosignwebhook --create-namespace \
--wait \
Expand Down

0 comments on commit 56a1b54

Please sign in to comment.