Skip to content

Commit 54b2ce2

Browse files
mmitcheCopilot
andauthored
Add enablePublishing parameter to opt out of V4 artifact publishing (dotnet#16664)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
1 parent a5f0eb9 commit 54b2ce2

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

eng/common/core-templates/job/job.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ parameters:
2424
enablePublishBuildArtifacts: false
2525
enablePublishBuildAssets: false
2626
enablePublishTestResults: false
27+
enablePublishing: false
2728
enableBuildRetry: false
2829
mergeTestResults: false
2930
testRunTitle: ''

eng/common/templates-official/job/job.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ jobs:
6363
# V4 publishing: automatically publish staged artifacts as a pipeline artifact.
6464
# The artifact name matches the SDK's FutureArtifactName ($(System.PhaseName)_Artifacts),
6565
# which is encoded in the asset manifest for downstream publishing to discover.
66-
- ${{ if eq(parameters.publishingVersion, 4) }}:
66+
# Jobs can opt in by setting enablePublishing: true.
67+
- ${{ if and(eq(parameters.publishingVersion, 4), eq(parameters.enablePublishing, 'true')) }}:
6768
- output: pipelineArtifact
6869
displayName: 'Publish V4 pipeline artifacts'
6970
targetPath: '$(Build.ArtifactStagingDirectory)/artifacts'

0 commit comments

Comments
 (0)