Skip to content

Commit

Permalink
Fixed the unbound variable issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 authored Oct 15, 2024
1 parent 03daec3 commit 3dc1817
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/actions/backend-deploy/files/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,16 @@ steps:
echo "Step 3: Trigger database migration job (if applicable) and update traffic to 100% for the new revision"
# Check if migrations directory exists and execute migration job
if [ -d "migrations" ]; then
PROJECT_ID=$(cat /workspace/project_id.txt)
JOB_NAME="${_APP_NAME}-db-migration-${_DEPLOYMENT_ENV}"
DEPLOYED_REVISION=$(cat /workspace/deployed_revision.txt)
PROJECT_ID=$(cat /workspace/project_id.txt)
JOB_NAME="${_APP_NAME}-db-migration-${_DEPLOYMENT_ENV}"
DEPLOYED_REVISION=$(cat /workspace/deployed_revision.txt)
echo "DEPLOY_PROJECT_ID: $PROJECT_ID"
echo "JOB_NAME: $JOB_NAME"
echo "DEPLOYED_REVISION: $DEPLOYED_REVISION"
echo "DEPLOY_PROJECT_ID: $PROJECT_ID"
echo "JOB_NAME: $JOB_NAME"
echo "DEPLOYED_REVISION: $DEPLOYED_REVISION"
# Check if migrations directory exists and execute migration job
if [ -d "migrations" ]; then
if gcloud run jobs describe $JOB_NAME --project=$PROJECT_ID --region=${_REGION} --format="value(metadata.name)" 2> /dev/null ; then
# Run the job and capture the output
JOB_OUTPUT=$(gcloud run jobs execute "$JOB_NAME" \
Expand Down

0 comments on commit 3dc1817

Please sign in to comment.