79164866

Date: 2024-11-07 02:48:16
Score: 2
Natty:
Report link

@user18610347 I tested a similar setup, and here’s a version that works for me:


variables:
  ${{ if or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release')) }}:
    branchName: 'master'
  ${{ else }}:
    branchName: 'develop'

stages:
  - stage: Build
    jobs:
      - job: BuildJob
        steps:
          - script: echo "branchName is $(branchName)"

enter image description here Here is the pipeline for your review: https://dev.azure.com/nacho-chukwu/Infrastructure%20As%20A%20Code/_build/results?buildId=167&view=logs&j=a314f22c-0d8d-5f4e-2e5a-7023d7141778&t=afcbd69d-6218-5d12-27f7-cd8c790f2eca

Reasons:
  • Whitelisted phrase (-1): works for me
  • Probably link only (1):
  • Contains signature (1):
  • Has code block (-0.5):
  • User mentioned (1): @user18610347
  • Low reputation (0.5):
Posted by: nacho