From 3048a5f0e25dc2a1a734e3f6bdddec1fdd19504b Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Fri, 22 Sep 2023 14:17:43 +0100 Subject: [PATCH] Deploy releases to staging-preprod first (#5308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem Before releasing new version to production, we'd like to run a set of required checks on the incoming release. The simplest approach, which doesn't require many changes — dedicate one staging region to `preprod` installation. The proposed changes to the release flow are the following: - When a release PR is merged into the release branch — trigger deployment from the release branch to a dedicated staging-preprod region (for now, it's going to be `eu-west-1` — Ireland) Corresponding infrastructure PR: https://github.com/neondatabase/aws/pull/585 ## Summary of changes - Trigger `deploy.dev` workflow with `-f deployPreprodRegion=true` for release branch --- .github/workflows/build_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d31c8ad66e..7c2f042315 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1091,8 +1091,9 @@ jobs: GH_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }} run: | if [[ "$GITHUB_REF_NAME" == "main" ]]; then - gh workflow --repo neondatabase/aws run deploy-dev.yml --ref main -f branch=main -f dockerTag=${{needs.tag.outputs.build-tag}} + gh workflow --repo neondatabase/aws run deploy-dev.yml --ref main -f branch=main -f dockerTag=${{needs.tag.outputs.build-tag}} -f deployPreprodRegion=false elif [[ "$GITHUB_REF_NAME" == "release" ]]; then + gh workflow --repo neondatabase/aws run deploy-dev.yml --ref main -f branch=main -f dockerTag=${{needs.tag.outputs.build-tag}} -f deployPreprodRegion=true gh workflow --repo neondatabase/aws run deploy-prod.yml --ref main -f branch=main -f dockerTag=${{needs.tag.outputs.build-tag}} -f disclamerAcknowledged=true else echo "GITHUB_REF_NAME (value '$GITHUB_REF_NAME') is not set to either 'main' or 'release'"