diff --git a/azure-pipelines/cd.yaml b/azure-pipelines/cd.yaml index 87c263c..dcc2128 100644 --- a/azure-pipelines/cd.yaml +++ b/azure-pipelines/cd.yaml @@ -19,9 +19,9 @@ pool: variables: - template: vars/global.yaml -- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: +- ${{ if eq(variables.isMain, 'True') }}: - group: e2e-gov-demo-dev-kv -- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/production') }}: +- ${{ if eq(variables.isProduction, 'True') }}: - group: e2e-gov-demo-kv stages: @@ -34,7 +34,6 @@ stages: displayName: Terraform Plan and Apply steps: - template: steps/debug-vars.yaml - - template: steps/confirm-kv-loaded.yaml - template: steps/terraform-init.yaml - template: steps/terraform-plan.yaml parameters: diff --git a/azure-pipelines/ci.yaml b/azure-pipelines/ci.yaml index e490c78..d2403fd 100644 --- a/azure-pipelines/ci.yaml +++ b/azure-pipelines/ci.yaml @@ -3,7 +3,6 @@ name: $(BuildID) trigger: branches: include: - - main - feat/* - fix/* paths: diff --git a/azure-pipelines/steps/confirm-kv-loaded.yaml b/azure-pipelines/steps/confirm-kv-loaded.yaml deleted file mode 100644 index 3aeb673..0000000 --- a/azure-pipelines/steps/confirm-kv-loaded.yaml +++ /dev/null @@ -1,19 +0,0 @@ -steps: -- bash: | - echo "" - echo "--------------------------------" - echo "Confirm Key Vault 🔑 Integration" - echo "--------------------------------" - echo "KV_DEBUG_ENV: $KV_DEBUG_ENV" - echo "" - if [ "$KV_DEBUG_ENV" = '$(kv-debug-env)' ]; then - echo "⛔️ Key Vault not loaded" - echo "Please double check configuration Variable Groups in Azure Pipelines UI and that the YAML pipeline is running against the 'main' or 'production' branch." - exit 1 - else - echo "✅ Key Vault loaded" - fi - displayName: Debug - Key Vault loaded? - env: - KV_DEBUG_ENV: $(kv-debug-env) - diff --git a/azure-pipelines/steps/debug-vars.yaml b/azure-pipelines/steps/debug-vars.yaml index 0edb38c..c7c5da6 100644 --- a/azure-pipelines/steps/debug-vars.yaml +++ b/azure-pipelines/steps/debug-vars.yaml @@ -4,7 +4,7 @@ steps: echo "---------" echo "Debugging" echo "---------" - echo "isMain: ${{ variables.isMain }}" - echo "isProduction: ${{ variables.isProduction }}" + echo "isMain: $(isMain)" + echo "isProduction: $(isProduction)" echo "Build.SourceBranch: ${{ variables['Build.SourceBranch'] }}" displayName: Debug - Branch Variables \ No newline at end of file