From f16452bf9d22fd6bfe730086a092802a171bfa79 Mon Sep 17 00:00:00 2001 From: Valentin de la Cruz Barquero <6054336+vdelacruzb@users.noreply.github.com> Date: Fri, 29 Dec 2023 15:06:59 +0100 Subject: [PATCH] chore(bq,sf,rs,pg): fix naming dedicated deployments for releases (#462) --- .github/workflows/bigquery-ded.yml | 8 ++------ .github/workflows/postgres-ded.yml | 10 +++------- .github/workflows/redshift-ded.yml | 8 ++------ .github/workflows/snowflake-ded.yml | 8 ++------ 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/bigquery-ded.yml b/.github/workflows/bigquery-ded.yml index abcc20d06..a4eb69dd6 100644 --- a/.github/workflows/bigquery-ded.yml +++ b/.github/workflows/bigquery-ded.yml @@ -27,15 +27,11 @@ jobs: - name: Set BQ_PREFIX for releases if: startsWith(github.event.pull_request.head.ref, 'release/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#release/} - echo "BQ_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "BQ_PREFIX=dedicated_release_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set BQ_PREFIX for hotfixes if: startsWith(github.event.pull_request.head.ref, 'hotfix/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#hotfix/} - echo "BQ_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "BQ_PREFIX=dedicated_hotfix_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set BQ_PREFIX for regular deploys if: | !(startsWith(github.event.pull_request.head.ref, 'hotfix/')) && diff --git a/.github/workflows/postgres-ded.yml b/.github/workflows/postgres-ded.yml index 82ab96343..dab67efa2 100644 --- a/.github/workflows/postgres-ded.yml +++ b/.github/workflows/postgres-ded.yml @@ -26,18 +26,14 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v2 - - name: Set PG_PREFIX for releases + - name: Set PG_PREFIX for releases if: startsWith(github.event.pull_request.head.ref, 'release/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#release/} - echo "PG_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "PG_PREFIX=dedicated_release_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set PG_PREFIX for hotfixes if: startsWith(github.event.pull_request.head.ref, 'hotfix/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#hotfix/} - echo "PG_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "PG_PREFIX=dedicated_hotfix_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set PG_PREFIX for regular deploys if: | !(startsWith(github.event.pull_request.head.ref, 'hotfix/')) && diff --git a/.github/workflows/redshift-ded.yml b/.github/workflows/redshift-ded.yml index dc2d20494..c382169f6 100644 --- a/.github/workflows/redshift-ded.yml +++ b/.github/workflows/redshift-ded.yml @@ -33,15 +33,11 @@ jobs: - name: Set RS_PREFIX for releases if: startsWith(github.event.pull_request.head.ref, 'release/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#release/} - echo "RS_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "RS_PREFIX=dedicated_release_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set RS_PREFIX for hotfixes if: startsWith(github.event.pull_request.head.ref, 'hotfix/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#hotfix/} - echo "RS_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "RS_PREFIX=dedicated_hotfix_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set RS_PREFIX for regular deploys if: | !(startsWith(github.event.pull_request.head.ref, 'hotfix/')) && diff --git a/.github/workflows/snowflake-ded.yml b/.github/workflows/snowflake-ded.yml index 250fe4e90..fb69c846a 100644 --- a/.github/workflows/snowflake-ded.yml +++ b/.github/workflows/snowflake-ded.yml @@ -28,15 +28,11 @@ jobs: - name: Set SF_PREFIX for releases if: startsWith(github.event.pull_request.head.ref, 'release/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#release/} - echo "SF_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "SF_PREFIX=dedicated_release_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set SF_PREFIX for hotfixes if: startsWith(github.event.pull_request.head.ref, 'hotfix/') run: | - BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - VERSION=${BRANCH_NAME#hotfix/} - echo "SF_PREFIX=dedicated_release_${VERSION}_" >> $GITHUB_ENV + echo "SF_PREFIX=dedicated_hotfix_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV - name: Set SF_PREFIX for regular deploys if: | !(startsWith(github.event.pull_request.head.ref, 'hotfix/')) &&