Closed MichaelSimons closed 2 months ago
A very similar issue was occurring in docker: https://github.com/dotnet/docker-tools/issues/1323
Here is a summary of the options & their respective challenges:
$(System.JobAttempt)
to the artifact name
Frankly, none of the options are great. In an ideal world, we could delete the old artifacts and upload new ones. But since that's not possible, I think that the best way forward is to condition the publishing of the artifacts on the success of previous step. It poses the least risk and complications, and we'd still have the logs and binlogs from previous attempts so if there's a failure on a previous attempt, we'd still be able to investigate. This is also the solution that was decided upon in https://github.com/dotnet/docker-tools/issues/1323.
I agree @ellahathaway with your assessment.
The Publish Artifacts CI build step will fail if rerun when a previous attempt has uploaded any artifacts. This is because the publish build step is set to run on success or failure and that it does not support overwriting artifacts. When the occurs, the failure will will look similar to the following:
There are a couple options to solve this but they have some cons: