Skip to content

Commit de18069

Browse files
committed
Fix Cloud Build substitutions by escaping shell variables
1 parent 800e78e commit de18069

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/google-cloud-storage/cloudbuild/zb-system-tests-cloudbuild.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,24 @@ steps:
3636
echo "Removing all keys."
3737
echo "---------------------------------------------------------------------"
3838
39-
FINGERPRINTS_TO_DELETE=$(gcloud compute os-login ssh-keys list \
39+
FINGERPRINTS_TO_DELETE=$$(gcloud compute os-login ssh-keys list \
4040
--format="value(fingerprint)")
4141
42-
echo "Keys to delete: $FINGERPRINTS_TO_DELETE"
42+
echo "Keys to delete: $$FINGERPRINTS_TO_DELETE"
4343
44-
if [ -z "$FINGERPRINTS_TO_DELETE" ]; then
44+
if [ -z "$$FINGERPRINTS_TO_DELETE" ]; then
4545
echo "No keys found to delete. Nothing to do."
4646
exit 0
4747
fi
4848
4949
while IFS= read -r FINGERPRINT; do
50-
if [ -n "$FINGERPRINT" ]; then
51-
echo "Deleting key with fingerprint: ${FINGERPRINT}"
50+
if [ -n "$$FINGERPRINT" ]; then
51+
echo "Deleting key with fingerprint: $$FINGERPRINT"
5252
gcloud compute os-login ssh-keys remove \
53-
--key="${FINGERPRINT}" \
53+
--key="$$FINGERPRINT" \
5454
--quiet || true
5555
fi
56-
done <<< "$FINGERPRINTS_TO_DELETE"
56+
done <<< "$$FINGERPRINTS_TO_DELETE"
5757
5858
echo "---------------------------------------------------------------------"
5959
echo "Cleanup complete."

0 commit comments

Comments
 (0)