From 4f69e1e0a66d3f12c4750a2d06903d84278fed2a Mon Sep 17 00:00:00 2001 From: Weimin Yu Date: Wed, 8 Jun 2022 13:58:56 -0400 Subject: [PATCH] Remove bracket in Cloud Build script (#1658) * Remove bracket around varname in CloudBuild script Due to spinnaker restriction: it cannot handle variable references where the var name has brackets around it. Added spinnaker error message to the comments --- release/cloudbuild-schema-verify.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release/cloudbuild-schema-verify.yaml b/release/cloudbuild-schema-verify.yaml index d64aa4866..c33b0b83d 100644 --- a/release/cloudbuild-schema-verify.yaml +++ b/release/cloudbuild-schema-verify.yaml @@ -23,7 +23,9 @@ # variable references must avoid the ${var} format. Valid formats include # $var or ${"${var}"}. This file use the former. Since _ENV is expanded in the # copies sent to Spinnaker, we preserve the brackets around them for safe -# pattern matching during release. +# pattern matching during release. If the invalid ${var} format is used, the +# Spinnaker error message will have the following: +# 'Invalid JSON payload received. Unknown name \"expressionEvaluationSummary\"' # See https://github.com/spinnaker/spinnaker/issues/3028 for more information. steps: # Download and decrypt the nomulus tool credential, which has the privilege to @@ -69,7 +71,7 @@ steps: set -e deployed_schema_tag=$(gsutil cat \ gs://$PROJECT_ID-deployed-tags/sql.${_ENV}.tag) - gsutil cp gs://$PROJECT_ID-deploy/${deployed_schema_tag}/schema.jar \ + gsutil cp gs://$PROJECT_ID-deploy/$deployed_schema_tag/schema.jar \ /schema # Verify the schema - name: 'gcr.io/$PROJECT_ID/schema_verifier:latest'