Skip to content

Commit

Permalink
add double quote in image-sign.sh to prevent globbing and word splitting
Browse files Browse the repository at this point in the history
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
  • Loading branch information
LiZhenCheng9527 committed Jan 27, 2024
1 parent 853543c commit 9075db3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hack/image-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ 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}
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
Expand Down

0 comments on commit 9075db3

Please sign in to comment.