Skip to content

Allow ReleaseConfigs artifact publish to continue on job rerun - #17461

Draft
JoeRobich with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-publish-releaseconfigs-artifact
Draft

Allow ReleaseConfigs artifact publish to continue on job rerun#17461
JoeRobich with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-publish-releaseconfigs-artifact

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Azure DevOps pipeline artifacts are immutable, so rerunning a publish-build-assets job fails with Artifact ReleaseConfigs already exists for build ... — the artifact was published by the first attempt.

Changes

eng/common/core-templates/job/publish-build-assets.yml:

  • Publish ReleaseConfigs Artifact — pass continueOnError: true through the args object. A rerun proceeds past the already-exists error, while still publishing normally if the first attempt failed before this step.
  • Create ReleaseConfigs Artifact — first line now uses Set-Content instead of Add-Content, so ReleaseConfigs.txt is recreated rather than appended when a retry lands on a reused workspace. Three-line format unchanged.
           displayName: Publish ReleaseConfigs Artifact
           targetPath: '$(Build.StagingDirectory)/ReleaseConfigs'
           artifactName: ReleaseConfigs
+          continueOnError: true
           retryCountOnTaskFailure: 10 # for any files being locked

Notes

  • Artifact name is intentionally left as ReleaseConfigs (no $(System.JobAttempt) suffix) — downstream jobs download that stable name.
  • Scoped to this step only; the generic publish-pipeline-artifacts.yml templates are untouched. Both the standard and 1ES implementations already forward continueOnError, so no changes were needed there.

To double check:

Copilot AI lite review requested due to automatic review settings August 31, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Co-authored-by: JoeRobich <611219+JoeRobich@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 31, 2026 21:37
Copilot AI changed the title [WIP] Fix Publish ReleaseConfigs Artifact step failure on rerun Allow ReleaseConfigs artifact publish to continue on job rerun Aug 31, 2026
Copilot AI requested a review from JoeRobich August 31, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

# Pipeline artifacts are immutable, so a job rerun fails with
# "Artifact ReleaseConfigs already exists for build ...". The artifact was already
# published by the previous attempt, so let the rerun continue.
continueOnError: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we'll hit the same issue for "Publish Merged Manifest" above.

I wonder if we could skip those tasks by checking whether eq(variables['System.JobAttempt'], 1)

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.

4 participants