From 8bc7151b2fd882c7606c4b0ccf43f58433f7998e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:44:50 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 8650 (#23204) * missed a condition passthrough --------- Co-authored-by: Scott Beddall Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com> --- eng/common/pipelines/templates/steps/set-default-branch.yml | 2 ++ eng/common/pipelines/templates/steps/verify-links.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eng/common/pipelines/templates/steps/set-default-branch.yml b/eng/common/pipelines/templates/steps/set-default-branch.yml index 31bf28936164..12ec1be317b4 100644 --- a/eng/common/pipelines/templates/steps/set-default-branch.yml +++ b/eng/common/pipelines/templates/steps/set-default-branch.yml @@ -2,6 +2,7 @@ parameters: WorkingDirectory: '$(System.DefaultWorkingDirectory)' RemoteRepo: 'origin' DefaultBranchVariableName: DefaultBranch + Condition: 'succeeded()' steps: - pwsh: | $setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1' @@ -13,4 +14,5 @@ steps: Write-Host "##vso[task.setvariable variable=${{ parameters.DefaultBranchVariableName }}]$setDefaultBranch" displayName: "Setup Default Branch" workingDirectory: ${{ parameters.workingDirectory }} + condition: ${{ parameters.Condition }} ignoreLASTEXITCODE: true diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index 8a84f8d0ecf9..4d84e124a87f 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -12,6 +12,8 @@ parameters: steps: - template: /eng/common/pipelines/templates/steps/set-default-branch.yml + parameters: + Condition: ${{ parameters.Condition }} - task: PowerShell@2 displayName: Link verification check condition: ${{ parameters.Condition }}