forked from kurator-dev/kurator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kurator-dev#588 from LiZhenCheng9527/image-sign
sign kurator images
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
IMAGE_HUB=${IMAGE_HUB:-"ghcr.io/kurator-dev"} | ||
IMAGE_TAG=${VERSION:-"$(VERSION)"} | ||
SIGN_IMAGE=${SIGN_IMAGE:-"0"} | ||
|
||
CLUSTER_OPERATOR_IMAGE=${CLUSTER_OPERATOR_IMAGE:-"${IMAGE_HUB}/cluster-operator:${IMAGE_TAG}"} | ||
FLEET_MANAGER_IMAGE=${FLEET_MANAGER_IMAGE:-"${IMAGE_HUB}/fleet-manager:${IMAGE_TAG}"} | ||
|
||
if [ "$SIGN_IMAGE" = "1" ]; then | ||
echo "Sign image: ""${CLUSTER_OPERATOR_IMAGE}" | ||
cosign sign --yes "${CLUSTER_OPERATOR_IMAGE}" | ||
echo "Sign image: ""${FLEET_MANAGER_IMAGE}" | ||
cosign sign --yes "${FLEET_MANAGER_IMAGE}" | ||
else | ||
echo "Warning: The build image is not signed" | ||
fi | ||
|