Skip to content

Commit

Permalink
faster deploy (#1146)
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld authored Nov 30, 2022
2 parents dc2ba03 + 03b0ec6 commit 3d7db65
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions terraform/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ trigger:
include:
- terraform/*
stages:
- stage: plan
- stage: terraform
pool:
vmImage: ubuntu-latest
jobs:
- job: plan
- job: terraform
steps:
# https://github.com/microsoft/azure-pipelines-terraform/tree/main/Tasks/TerraformInstaller#readme
- task: TerraformInstaller@0
Expand Down Expand Up @@ -45,6 +45,8 @@ stages:
workingDirectory: "$(System.DefaultWorkingDirectory)/terraform"
# service connection
environmentServiceNameAzureRM: Production
# the plan is done as part of the apply (below), so don't bother doing it twice
condition: ne(variables['Build.SourceBranchName'], 'dev')
- task: TerraformTaskV3@3
displayName: Terraform apply
inputs:
Expand All @@ -56,4 +58,4 @@ stages:
# service connection
environmentServiceNameAzureRM: Production
# only run on dev
condition: eq(variables['Build.SourceBranch'], 'refs/heads/dev')
condition: eq(variables['Build.SourceBranchName'], 'dev')

0 comments on commit 3d7db65

Please sign in to comment.