From eca6eef93281a535c5559d253667982ddcff13ca Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Thu, 31 Aug 2023 20:57:19 +0000 Subject: [PATCH] refactor: simplify condition by consolidating 'or' expression --- terraform/pipeline/azure-pipelines.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/terraform/pipeline/azure-pipelines.yml b/terraform/pipeline/azure-pipelines.yml index 0b3ff7e2..16b7aa3c 100644 --- a/terraform/pipeline/azure-pipelines.yml +++ b/terraform/pipeline/azure-pipelines.yml @@ -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 @@ -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