From dc9037f32f9cd46cf612fda89591bdeb0a96f02a Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Tue, 4 Mar 2025 10:38:53 +0000 Subject: [PATCH] Don't exit on error when querying secret --- iac/network/scripts/deploy_bootnodes.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iac/network/scripts/deploy_bootnodes.sh b/iac/network/scripts/deploy_bootnodes.sh index 86a539046c24..e05da10fecf0 100755 --- a/iac/network/scripts/deploy_bootnodes.sh +++ b/iac/network/scripts/deploy_bootnodes.sh @@ -115,7 +115,12 @@ while read -r REGION IP; do PRIVATE_KEY=$(cd scripts && ./generate_private_key.sh $TAG) # Check if the secret exists + + # Disable exit on error temporarily + set +e EXISTING_SECRET=$(gcloud secrets describe "$SECRET_NAME" --format="value(name)" 2>/dev/null) + # Re-enable exit on error + set -e if [[ -z "$EXISTING_SECRET" ]]; then echo "Secret '${SECRET_NAME}' does not exist. Creating it now..."