Skip to content

Add enablePublishing parameter to opt out of V4 artifact publishing#16664

Merged
mmitche merged 1 commit intomainfrom
dev/mmitche/enable-publishing-param
Apr 2, 2026
Merged

Add enablePublishing parameter to opt out of V4 artifact publishing#16664
mmitche merged 1 commit intomainfrom
dev/mmitche/enable-publishing-param

Conversation

@mmitche
Copy link
Copy Markdown
Member

@mmitche mmitche commented Apr 1, 2026

V4 publishing automatically publishes pipeline artifacts for every job via the 1ES job template. Jobs that don't produce publishable artifacts (e.g. validation or test-only jobs) can now set enablePublishing: false to skip the V4 pipeline artifact publish step.

Problem

When publishingVersion: 4 is set at the jobs.yml level, all jobs get a Publish V4 pipeline artifacts output step. This causes issues for:

  • Matrix jobs sharing the same `` - the second matrix config fails with "Artifact already exists"
  • Non-publishing jobs (validation, test-only) - create unnecessary empty artifacts

In V3, DotNetPublishUsingPipelines controlled this per-job implicitly. V4 lost that granularity.

Solution

Add an enablePublishing parameter (default: true) to the core job template. The 1ES job template gates the V4 publish step on this parameter.

Changes

  • eng/common/core-templates/job/job.yml: Declare enablePublishing: true parameter
  • eng/common/templates-official/job/job.yml: Gate V4 publish on ne(parameters.enablePublishing, 'false')

Validation

Tested in arcade-validation with enablePublishing: false on validation jobs:

V4 publishing automatically publishes pipeline artifacts for every job via
the 1ES job template. This adds an enablePublishing parameter (default: false)
so jobs must explicitly opt in with enablePublishing: true to get V4 artifact
publishing. This prevents non-publishing jobs (validation, test-only) from
creating unnecessary or duplicate artifacts.

Validated in arcade-validation:
https://dev.azure.com/dnceng/internal/_build/results?buildId=2941358

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mmitche mmitche force-pushed the dev/mmitche/enable-publishing-param branch from e505c1b to 612f005 Compare April 1, 2026 22:28
Copy link
Copy Markdown
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says opt-out but looks like it's implemented as opt-in?

@mmitche
Copy link
Copy Markdown
Member Author

mmitche commented Apr 2, 2026

The PR description says opt-out but looks like it's implemented as opt-in?

I had it switch to make it opt-in, matching existing behavior.

@mmitche mmitche merged commit 0a948ff into main Apr 2, 2026
9 checks passed
@mmitche mmitche deleted the dev/mmitche/enable-publishing-param branch April 2, 2026 16:25
Copilot AI pushed a commit that referenced this pull request Apr 7, 2026
…16664)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
mmitche added a commit to mmitche/arcade that referenced this pull request Apr 8, 2026
…otnet#16664)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
(cherry picked from commit 54b2ce2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants