Skip to content

Commit

Permalink
[EC-68] Force TF init in CD pipelines (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 authored Jan 5, 2024
1 parent e3661ff commit bf723de
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/ioweb_prod_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ jobs:
# https://github.com/pagopa/terraform-install-action/commits/main
uses: pagopa/terraform-install-action@1f76f593176e58c423b88d72273a612ba7ba430b

- name: Terraform Init
id: terraform_init_common
working-directory: ${{ env.DIR }}-common
shell: bash
run: |
bash ./terraform.sh init prod
- name: Terraform apply common
# from https://github.com/pagopa/terraform-apply-azure-action/commits/main
uses: pagopa/terraform-apply-azure-action@87efc4aa9b093b99ae5fd1915977e29cd80861ab
Expand All @@ -102,6 +109,13 @@ jobs:
dir: ${{ env.DIR }}-common
azure_environment: prod

- name: Terraform Init
id: terraform_init_weu-prod01
working-directory: ${{ env.DIR }}-app
shell: bash
run: |
bash ./terraform.sh init weu-prod01
- name: Terraform apply app (weu-prod01)
# from https://github.com/pagopa/terraform-apply-azure-action/commits/main
uses: pagopa/terraform-apply-azure-action@87efc4aa9b093b99ae5fd1915977e29cd80861ab
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/prod_cd_citizen-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Continuous Delivery on prod citizen-auth

on:
workflow_dispatch:
# Trigger the workflow on push on the main branch
push:
branches:
- main
Expand All @@ -24,7 +23,9 @@ jobs:
name: Terraform Pre Apply
runs-on: self-hosted
environment: prod-ci

steps:

- name: Checkout
id: checkout
# from https://github.com/actions/checkout/commits/main
Expand Down Expand Up @@ -82,7 +83,9 @@ jobs:
runs-on: self-hosted
environment: prod-cd
needs: [terraform_preapply_job]

steps:

- name: Checkout
id: checkout
# from https://github.com/actions/checkout/commits/main
Expand All @@ -100,6 +103,13 @@ jobs:
# https://github.com/pagopa/terraform-install-action/commits/main
uses: pagopa/terraform-install-action@1f76f593176e58c423b88d72273a612ba7ba430b

- name: Terraform Init
id: terraform_init_common
working-directory: ${{ env.DIR }}-common
shell: bash
run: |
bash ./terraform.sh init prod
- name: Terraform apply common
# from https://github.com/pagopa/terraform-apply-azure-action/commits/main
uses: pagopa/terraform-apply-azure-action@87efc4aa9b093b99ae5fd1915977e29cd80861ab
Expand All @@ -110,6 +120,13 @@ jobs:
dir: ${{ env.DIR }}-common
azure_environment: prod

- name: Terraform Init
id: terraform_init_weu-beta
working-directory: ${{ env.DIR }}-app
shell: bash
run: |
bash ./terraform.sh init weu-beta
- name: Terraform apply weu-beta
# from https://github.com/pagopa/terraform-apply-azure-action/commits/main
uses: pagopa/terraform-apply-azure-action@87efc4aa9b093b99ae5fd1915977e29cd80861ab
Expand All @@ -120,6 +137,13 @@ jobs:
dir: ${{ env.DIR }}-app
azure_environment: weu-beta

- name: Terraform Init
id: terraform_init_weu-prod01
working-directory: ${{ env.DIR }}-app
shell: bash
run: |
bash ./terraform.sh init weu-prod01
- name: Terraform apply weu-prod01
# from https://github.com/pagopa/terraform-apply-azure-action/commits/main
uses: pagopa/terraform-apply-azure-action@87efc4aa9b093b99ae5fd1915977e29cd80861ab
Expand Down

0 comments on commit bf723de

Please sign in to comment.