Skip to content

Commit

Permalink
refactor: simplify condition by consolidating 'or' expression
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Aug 31, 2023
1 parent 3610f01 commit eca6eef
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions terraform/pipeline/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ stages:
condition: |
or(
in(variables['Build.SourceBranchName'], 'dev', 'test', 'prod'),
or(
eq(variables['setvars.tag_type'], 'test'),
eq(variables['setvars.tag_type'], 'prod')
)
eq(variables['setvars.tag_type'], 'test'),
eq(variables['setvars.tag_type'], 'prod')
)
- stage: TerraformApply
dependsOn: TerraformPlan
Expand All @@ -115,10 +113,8 @@ stages:
condition: |
or(
in(variables['Build.SourceBranchName'], 'dev', 'test', 'prod'),
or(
eq(variables['tag_type'], 'test'),
eq(variables['tag_type'], 'prod')
)
eq(variables['tag_type'], 'test'),
eq(variables['tag_type'], 'prod')
)
jobs:
- deployment: Apply
Expand Down

0 comments on commit eca6eef

Please sign in to comment.