diff --git a/.github/workflows/cd-prestabulle-clean.yml b/.github/workflows/cd-prestabulle-clean.yml index c8d40b7..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.3.7" LABELS: ${{toJSON(github.event.pull_request.labels)}} jobs: @@ -31,8 +30,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 diff --git a/.github/workflows/integration-cd.yml b/.github/workflows/integration-cd.yml index 2578116..bd18b73 100644 --- a/.github/workflows/integration-cd.yml +++ b/.github/workflows/integration-cd.yml @@ -13,7 +13,7 @@ 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') || contains(github.event.pull_request.labels.*.name, 'prestabulle3') @@ -25,7 +25,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 +42,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/main' \ No newline at end of file diff --git a/.github/workflows/preprod-cd.yml b/.github/workflows/preproduction-cd.yml similarity index 64% rename from .github/workflows/preprod-cd.yml rename to .github/workflows/preproduction-cd.yml index c7c6601..9ba901f 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 ⚙️ @@ -31,20 +32,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: preprod-cd-build-qanightly.yml + workflow: preproduction-cd.yml repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}"}' - token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' - - - name: Trigger deploy - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: preprod-cd-deploy-qanightly.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' diff --git a/.github/workflows/production-cd.yml b/.github/workflows/production-cd.yml index 3b95afd..8ab19f4 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 ⚙️ @@ -30,20 +31,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: production-cd-build-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' - - - name: Trigger deploy - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: production-cd-deploy-qanightly.yml - repo: PrestaShopCorp/qanightlyresults-cd - inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}"}' - token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }} - ref: 'refs/heads/main' + ref: 'refs/heads/main' \ No newline at end of file