-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Task name
DownloadPipelineArtifact@2
Task version
No response
Environment type (Please select at least one enviroment where you face this issue)
- Self-Hosted
- Microsoft Hosted
- VMSS Pool
- Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
windows-latest
Question
I'm trying to set up a pipeline that can rerun failed jobs that involve publishing artifacts. I've seen the following recommendation:
This is currently a limitation of pipeline artifacts. You have a few options: (a) Use publish/download build artifacts tasks instead of publish/download pipeline artifacts. (b) Generate a unique name for your pipeline artifact upon retry (for e.g., by using the System.JobAttempt variable).
The documentations specifies using the System.JobId variable. If we include this in our artifact name, how can another job get access to this variable? I don't want to rely on buildType: current for the DownloadPipelineArtifact task, which might include a lot of other artifacts we don't need.
See can-i-delete-pipeline-artifacts-when-rerunning-failed-jobs
Thanks!