Skip to content

Commit 4cf1c11

Browse files
authored
Fix symbol-publish gate in build-all-lib.yml to use a branch allowlist (#4960)
1 parent 936110d commit 4cf1c11

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

eng/pipelines/build-all-lib.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ extends:
182182

183183
# Stage shipping binaries for symbol upload BEFORE the test step;
184184
# see publish-symbols-stage.yml for why this must run pre-test.
185-
# Pipeline only triggers on v* tags, but condition is explicit so
186-
# a manual queue against a branch does not unintentionally upload.
185+
# Symbols publish from the branches we ship from (main/dev/dev-v5/archives/*),
186+
# whether the run is queued manually or via the declared tag trigger.
187187
- template: /eng/pipelines/publish-symbols-stage.yml@self
188188
parameters:
189-
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
189+
condition: and(succeeded(), or(in(variables['Build.SourceBranch'], 'refs/heads/main', 'refs/heads/dev', 'refs/heads/dev-v5'), startsWith(variables['Build.SourceBranch'], 'refs/heads/archives/'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')))
190190

191191
# Test and generate Code Coverage
192192
- task: DotNetCoreCLI@2
@@ -225,7 +225,7 @@ extends:
225225

226226
- template: /eng/pipelines/publish-symbols-upload.yml@self
227227
parameters:
228-
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
228+
condition: and(succeeded(), or(in(variables['Build.SourceBranch'], 'refs/heads/main', 'refs/heads/dev', 'refs/heads/dev-v5'), startsWith(variables['Build.SourceBranch'], 'refs/heads/archives/'), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')))
229229

230230
# Since NuGet packages are generated during the build, we need to copy them to the artifacts folder.
231231
- task: CopyFiles@2

0 commit comments

Comments
 (0)