diff --git a/.devops/code-review-pipelines.yml b/.devops/code-review-pipelines.yml index 641af042d..53fd6c72e 100644 --- a/.devops/code-review-pipelines.yml +++ b/.devops/code-review-pipelines.yml @@ -1,5 +1,5 @@ pr: - autoCancel: true + autoCancel: false # prevent terraform state lock on new commits branches: include: - main @@ -70,27 +70,27 @@ stages: ENVIRONMENT: dev WORKINGDIR: 'src/core' - # - stage: UAT - # dependsOn: [] - # condition: and(succeeded(), eq(${{parameters.UAT}}, true)) - # pool: - # name: selfcare-uat-linux - # jobs: - # - job: terraform_install - # steps: - # # 1. Install terraform and terragrunt - # - template: templates/terraform-setup/template.yaml@terraform - # - job: terraform_plan - # dependsOn: terraform_install - # timeoutInMinutes: $[variables.TIME_OUT] - # steps: - # - checkout: self - # # 2. Run terragrunt plan - # - template: templates/terraform-plan/template.yaml@terraform - # parameters: - # SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN - # ENVIRONMENT: uat - # WORKINGDIR: 'src/core' + - stage: UAT + dependsOn: [] + condition: and(succeeded(), eq(${{parameters.UAT}}, true)) + pool: + name: selfcare-uat-linux + jobs: + - job: terraform_install + steps: + # 1. Install terraform and terragrunt + - template: templates/terraform-setup/template.yaml@terraform + - job: terraform_plan + dependsOn: terraform_install + timeoutInMinutes: $[variables.TIME_OUT] + steps: + - checkout: self + # 2. Run terragrunt plan + - template: templates/terraform-plan/template.yaml@terraform + parameters: + SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN + ENVIRONMENT: uat + WORKINGDIR: 'src/core' - stage: PROD dependsOn: [] diff --git a/.devops/deploy-pipelines.yml b/.devops/deploy-pipelines.yml index 8361bb51c..f0f274ec5 100644 --- a/.devops/deploy-pipelines.yml +++ b/.devops/deploy-pipelines.yml @@ -85,50 +85,50 @@ stages: ENVIRONMENT: dev WORKINGDIR: 'src/core' - # # UAT - # - stage: plan_UAT - # dependsOn: [] - # condition: and(succeeded(), eq(${{parameters.UAT}}, true)) - # pool: - # name: selfcare-uat-linux - # jobs: - # - job: plan - # timeoutInMinutes: $[variables.TIME_OUT] - # steps: - # # 1. Install terraform - # - template: templates/terraform-setup/template.yaml@terraform - # # 2. Run terraform plan - # - template: templates/terraform-plan/template.yaml@terraform - # parameters: - # SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN - # ENVIRONMENT: uat - # WORKINGDIR: 'src/core' + # UAT + - stage: plan_UAT + dependsOn: [] + condition: and(succeeded(), eq(${{parameters.UAT}}, true)) + pool: + name: selfcare-uat-linux + jobs: + - job: plan + timeoutInMinutes: $[variables.TIME_OUT] + steps: + # 1. Install terraform + - template: templates/terraform-setup/template.yaml@terraform + # 2. Run terraform plan + - template: templates/terraform-plan/template.yaml@terraform + parameters: + SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN + ENVIRONMENT: uat + WORKINGDIR: 'src/core' - # - stage: apply_UAT - # dependsOn: [plan_UAT] - # condition: and(succeeded(), eq(${{parameters.UAT}}, true)) - # pool: - # name: selfcare-uat-linux - # jobs: - # # - job: init - # # steps: - # # # 1. Install terraform - # # - template: templates/terraform-setup/template.yaml@terraform - # - deployment: apply - # continueOnError: false - # # dependsOn: init - # environment: 'UAT' - # strategy: - # runOnce: - # deploy: - # steps: - # - checkout: self - # # 3. Run terraform apply - # - template: templates/terraform-apply/template.yaml@terraform - # parameters: - # SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN - # ENVIRONMENT: uat - # WORKINGDIR: 'src/core' + - stage: apply_UAT + dependsOn: [plan_UAT] + condition: and(succeeded(), eq(${{parameters.UAT}}, true)) + pool: + name: selfcare-uat-linux + jobs: + # - job: init + # steps: + # # 1. Install terraform + # - template: templates/terraform-setup/template.yaml@terraform + - deployment: apply + continueOnError: false + # dependsOn: init + environment: 'UAT' + strategy: + runOnce: + deploy: + steps: + - checkout: self + # 3. Run terraform apply + - template: templates/terraform-apply/template.yaml@terraform + parameters: + SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN + ENVIRONMENT: uat + WORKINGDIR: 'src/core' # PROD - stage: plan_PROD