From ab8287c18b9cf04bce4c0801be8ebd123b785f80 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Wed, 17 Jul 2024 10:57:51 -0700 Subject: [PATCH 1/2] missed a condition passthrough --- 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 31bf289361640..12ec1be317b46 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 8a84f8d0ecf99..7f0418484847c 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 }} From 73cac870da1a20f43a8f09d2b30eeb5259ae292a Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Wed, 17 Jul 2024 11:00:09 -0700 Subject: [PATCH 2/2] Update eng/common/pipelines/templates/steps/verify-links.yml --- eng/common/pipelines/templates/steps/verify-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index 7f0418484847c..4d84e124a87fb 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -13,7 +13,7 @@ parameters: steps: - template: /eng/common/pipelines/templates/steps/set-default-branch.yml parameters: - condition: ${{ parameters.Condition }} + Condition: ${{ parameters.Condition }} - task: PowerShell@2 displayName: Link verification check condition: ${{ parameters.Condition }}