Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append _Attempt$(System.JobAttempt) to artifact name on failure #46064

Merged
merged 9 commits into from
Jan 17, 2025

Conversation

ellahathaway
Copy link
Member

Fixes dotnet/source-build#4829

This PR breaks the Publish Artifacts step into two separate steps:

  • One step is conditioned to run on a successful build and publishes the artifacts to $(Agent.JobName)_Artifacts.
  • The other step is conditioned to run on a failed build and publishes the artifacts to $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt).

These changes allow for the artifacts to still be published on success or failure, and these changes prevent the failure described in dotnet/source-build#4829

@ellahathaway ellahathaway requested review from a team as code owners January 16, 2025 22:06
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Jan 16, 2025
eng/pipelines/templates/jobs/vmr-build.yml Outdated Show resolved Hide resolved
eng/pipelines/templates/jobs/vmr-build.yml Show resolved Hide resolved
Copy link
Member

@mthalman mthalman left a comment

Choose a reason for hiding this comment

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

Looking at the build results, it looks confusing why there are two Publish Artifact steps showing up with only one of them getting executed. I added some suggested display names to make that more clear.

I really like this pattern you've used. It ensures that artifacts only get uploaded once for either scenario (success or failure).

eng/pipelines/templates/jobs/vmr-build.yml Outdated Show resolved Hide resolved
eng/pipelines/templates/jobs/vmr-build.yml Outdated Show resolved Hide resolved
eng/pipelines/templates/jobs/vmr-build.yml Outdated Show resolved Hide resolved
eng/pipelines/templates/jobs/vmr-build.yml Outdated Show resolved Hide resolved
eng/pipelines/templates/jobs/vmr-build.yml Outdated Show resolved Hide resolved
@ellahathaway ellahathaway requested a review from mthalman January 17, 2025 16:58
@ellahathaway ellahathaway enabled auto-merge (squash) January 17, 2025 18:02
@ellahathaway ellahathaway merged commit b58cc9a into dotnet:main Jan 17, 2025
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Main] Publish Artifacts step failed after rerun
5 participants