From a97315e4b416d305bf85682eecbccc93dc4ed6e0 Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Thu, 6 Jul 2023 15:15:18 +0200 Subject: [PATCH 01/11] feat: rework workflow --- .github/workflows/integration-cd.yml | 20 ++++++------------- .../{preprod-cd.yml => preproduction-cd.yml} | 11 +++++----- .github/workflows/production-cd.yml | 11 +++++----- 3 files changed, 18 insertions(+), 24 deletions(-) rename .github/workflows/{preprod-cd.yml => preproduction-cd.yml} (81%) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index 2578116..9ef57ee 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -14,6 +14,7 @@ jobs: name: Deploy (integration) runs-on: ubuntu-latest concurrency: integration-cd + environment: integration if: contains(github.event.pull_request.labels.*.name, 'prestabulle1') || contains(github.event.pull_request.labels.*.name, 'prestabulle2') || contains(github.event.pull_request.labels.*.name, 'prestabulle3') @@ -25,7 +26,7 @@ jobs: - name: Authenticating to GCP ⚙️ uses: google-github-actions/auth@v1 with: - project_id: ${{ secrets.GCLOUD_NAMESPACE_INTEGRATION }} + project_id: ${{ secrets.GCP_RUN_PROJECT_ID }} credentials_json: ${{ secrets.INTEGRATION_GOOGLE_APPLICATION_CREDENTIALS }} - name: Setting up Cloud SDK ⚙️ @@ -42,20 +43,11 @@ jobs: id: branch uses: tj-actions/branch-names@v5.1 - - name: Trigger build + - name: Trigger CI / CD uses: aurelien-baudet/workflow-dispatch@v2 with: - workflow: integration-cd-build-qanightly.yml + workflow: integration-cd.yml repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}"}' + inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' - - - name: Trigger deploy - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: integration-cd-deploy-qanightly.yml - repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "label": "${{ steps.get_bulle.outputs.BULLE }}"}' - token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' + ref: 'refs/heads/feat/migration-nightly-upgrade' \ No newline at end of file diff --git a/.github/workflows/preprod-cd.yml b/.github/workflows/preproduction-cd.yml similarity index 81% rename from .github/workflows/preprod-cd.yml rename to .github/workflows/preproduction-cd.yml index c7c6601..36c7ff9 100644 --- a/.github/workflows/preprod-cd.yml +++ b/.github/workflows/preproduction-cd.yml @@ -12,6 +12,7 @@ jobs: preprod_deployment: name: Deploy (preprod) runs-on: ubuntu-latest + environment: preproduction concurrency: preprod-cd steps: @@ -21,7 +22,7 @@ jobs: - name: Authenticating to GCP ⚙️ uses: google-github-actions/auth@v1 with: - project_id: ${{ secrets.GCLOUD_NAMESPACE_PREPROD }} + project_id: ${{ secrets.GCP_RUN_PROJECT_ID }} credentials_json: ${{ secrets.PREPROD_GOOGLE_APPLICATION_CREDENTIALS }} - name: Setting up Cloud SDK ⚙️ @@ -40,11 +41,11 @@ jobs: token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} ref: 'refs/heads/main' - - name: Trigger deploy + - name: Trigger CI / CD uses: aurelien-baudet/workflow-dispatch@v2 with: - workflow: preprod-cd-deploy-qanightly.yml + workflow: preproduction-cd.yml repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}"}' + inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' + ref: 'refs/heads/feat/migration-nightly-upgrade' diff --git a/.github/workflows/production-cd.yml b/.github/workflows/production-cd.yml index 3b95afd..96054de 100644 --- a/.github/workflows/production-cd.yml +++ b/.github/workflows/production-cd.yml @@ -11,6 +11,7 @@ jobs: production_deployment: name: Deploy (production) runs-on: ubuntu-latest + environment: production concurrency: production-cd steps: @@ -20,7 +21,7 @@ jobs: - name: Authenticating to GCP ⚙️ uses: google-github-actions/auth@v1 with: - project_id: ${{ secrets.GCLOUD_NAMESPACE_PRODUCTION }} + project_id: ${{ secrets.GCP_RUN_PROJECT_ID }} credentials_json: ${{ secrets.PRODUCTION_GOOGLE_APPLICATION_CREDENTIALS }} - name: Setting up Cloud SDK ⚙️ @@ -39,11 +40,11 @@ jobs: token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} ref: 'refs/heads/main' - - name: Trigger deploy + - name: Trigger CI / CD uses: aurelien-baudet/workflow-dispatch@v2 with: - workflow: production-cd-deploy-qanightly.yml + workflow: production-cd.yml repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}"}' + inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' + ref: 'refs/heads/feat/migration-nightly-upgrade' \ No newline at end of file From 2eadbc107c46248fa43e7d9decff6399c13a1188 Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Thu, 6 Jul 2023 15:32:06 +0200 Subject: [PATCH 02/11] feat: rework workflow --- .github/workflows/cd-prestabulle-clean.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-prestabulle-clean.yml b/.github/workflows/cd-prestabulle-clean.yml index c8d40b7..622887b 100644 --- a/.github/workflows/cd-prestabulle-clean.yml +++ b/.github/workflows/cd-prestabulle-clean.yml @@ -7,7 +7,7 @@ on: - develop env: - TF_VERSION: "1.3.7" + TF_VERSION: '1.4.6' LABELS: ${{toJSON(github.event.pull_request.labels)}} jobs: @@ -31,8 +31,8 @@ jobs: - name: Trigger clean prestabulle uses: aurelien-baudet/workflow-dispatch@v2 with: - workflow: cd-prestabulle-clean.yml + workflow: prestabulle-clean.yml repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "project": "qanightly", "label": "${{ steps.get_bulle.outputs.BULLE }}"}' + inputs: '{ "project": "nightly", "bulle": "${{ steps.get_bulle.outputs.BULLE }}"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} ref: 'refs/heads/main' \ No newline at end of file From 52fb2dafa3e8066ca38824393ce7084f3ca10fa8 Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Thu, 6 Jul 2023 16:55:51 +0200 Subject: [PATCH 03/11] fix: workflow branch dispatch --- .github/workflows/integration-cd.yml | 4 ++-- .github/workflows/preproduction-cd.yml | 11 +---------- .github/workflows/production-cd.yml | 11 +---------- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index 9ef57ee..a752038 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -48,6 +48,6 @@ jobs: with: workflow: integration-cd.yml repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' + inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "api-nightly", "repository": "PrestaShop/QANightlyResults"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/migration-nightly-upgrade' \ No newline at end of file + ref: 'refs/heads/feat/migration-nightly' \ No newline at end of file diff --git a/.github/workflows/preproduction-cd.yml b/.github/workflows/preproduction-cd.yml index 36c7ff9..0aba8dd 100644 --- a/.github/workflows/preproduction-cd.yml +++ b/.github/workflows/preproduction-cd.yml @@ -32,15 +32,6 @@ jobs: id: branch uses: tj-actions/branch-names@v5.1 - - name: Trigger build - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: preprod-cd-build-qanightly.yml - repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}"}' - token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' - - name: Trigger CI / CD uses: aurelien-baudet/workflow-dispatch@v2 with: @@ -48,4 +39,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/migration-nightly-upgrade' + ref: 'refs/heads/feat/migration-nightly' diff --git a/.github/workflows/production-cd.yml b/.github/workflows/production-cd.yml index 96054de..35e26ed 100644 --- a/.github/workflows/production-cd.yml +++ b/.github/workflows/production-cd.yml @@ -31,15 +31,6 @@ jobs: id: branch uses: tj-actions/branch-names@v5.1 - - name: Trigger build - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: production-cd-build-qanightly.yml - repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}"}' - token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' - - name: Trigger CI / CD uses: aurelien-baudet/workflow-dispatch@v2 with: @@ -47,4 +38,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/migration-nightly-upgrade' \ No newline at end of file + ref: 'refs/heads/feat/migration-nightly' \ No newline at end of file From 34200cc4bda2472beb47c3f9049df83f0e9edd5b Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Mon, 10 Jul 2023 16:19:30 +0200 Subject: [PATCH 04/11] feat: error in integration workflow --- .github/workflows/integration-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index a752038..ac9abbe 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -48,6 +48,6 @@ jobs: with: workflow: integration-cd.yml repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "api-nightly", "repository": "PrestaShop/QANightlyResults"}' + inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} ref: 'refs/heads/feat/migration-nightly' \ No newline at end of file From 0190ca2083f6260468a502dd2b1ead1720b32031 Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Mon, 10 Jul 2023 16:27:44 +0200 Subject: [PATCH 05/11] feat: error in integration workflow --- .github/workflows/integration-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index ac9abbe..c37d7cd 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -50,4 +50,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/migration-nightly' \ No newline at end of file + ref: 'refs/heads/main' \ No newline at end of file From c1f75194115d3f9e811c15705aae701ac39d33cf Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Wed, 12 Jul 2023 14:22:30 +0200 Subject: [PATCH 06/11] fix: workflow + try --- .github/workflows/cd-prestabulle-clean.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cd-prestabulle-clean.yml b/.github/workflows/cd-prestabulle-clean.yml index 622887b..1b08107 100644 --- a/.github/workflows/cd-prestabulle-clean.yml +++ b/.github/workflows/cd-prestabulle-clean.yml @@ -7,7 +7,6 @@ on: - develop env: - TF_VERSION: '1.4.6' LABELS: ${{toJSON(github.event.pull_request.labels)}} jobs: From 65f2fbfdd074627887b2a700368b88d69032458f Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Wed, 12 Jul 2023 14:23:06 +0200 Subject: [PATCH 07/11] fix: workflow + try --- .github/workflows/integration-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index c37d7cd..ac9abbe 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -50,4 +50,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' \ No newline at end of file + ref: 'refs/heads/feat/migration-nightly' \ No newline at end of file From 8e7508b4baf84eb5ab7dfaf6a6d5ebc76a8f412e Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Wed, 12 Jul 2023 14:27:42 +0200 Subject: [PATCH 08/11] fix: workflow + try --- .github/workflows/integration-cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index ac9abbe..55643da 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -13,7 +13,6 @@ jobs: integration_deployment: name: Deploy (integration) runs-on: ubuntu-latest - concurrency: integration-cd environment: integration if: contains(github.event.pull_request.labels.*.name, 'prestabulle1') || contains(github.event.pull_request.labels.*.name, 'prestabulle2') || From d1d6fc5b06fd116c2f1c72a529f1f6fc808c1c7d Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Wed, 12 Jul 2023 15:11:50 +0200 Subject: [PATCH 09/11] fix: workflow --- .github/workflows/preproduction-cd.yml | 2 +- .github/workflows/production-cd.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preproduction-cd.yml b/.github/workflows/preproduction-cd.yml index 0aba8dd..9ba901f 100644 --- a/.github/workflows/preproduction-cd.yml +++ b/.github/workflows/preproduction-cd.yml @@ -39,4 +39,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/migration-nightly' + ref: 'refs/heads/main' diff --git a/.github/workflows/production-cd.yml b/.github/workflows/production-cd.yml index 35e26ed..8ab19f4 100644 --- a/.github/workflows/production-cd.yml +++ b/.github/workflows/production-cd.yml @@ -38,4 +38,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/migration-nightly' \ No newline at end of file + ref: 'refs/heads/main' \ No newline at end of file From 38d42566d7fc84f47473b7b966ae94ed75104b6e Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Thu, 13 Jul 2023 11:38:13 +0200 Subject: [PATCH 10/11] fix: ref on integration --- .github/workflows/integration-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index 55643da..8a3c2ab 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -49,4 +49,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/migration-nightly' \ No newline at end of file + ref: 'refs/heads/feat/main' \ No newline at end of file From 48ddf4d3d8b0151adbba0eb60c894996393086ab Mon Sep 17 00:00:00 2001 From: Elodie Billiot Date: Thu, 13 Jul 2023 11:38:44 +0200 Subject: [PATCH 11/11] fix: ref on integration --- .github/workflows/integration-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index 8a3c2ab..bd18b73 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -49,4 +49,4 @@ jobs: repo: PrestaShopCorp/qanightlyresults-cd inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board"}' token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/feat/main' \ No newline at end of file + ref: 'refs/heads/main' \ No newline at end of file