Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update publish template
Add logging and fix display name given Agent.JobStatus doesn't evaluate currently in the display name property.
  • Loading branch information
weshaggard authored and azure-sdk committed Jun 18, 2024
commit 81cc2d2b47c1f029e46c7b3a90c09df2c31003a5
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ parameters:
steps:
- pwsh: |
if ($env:AGENT_JOBSTATUS -eq "Failed") {
Write-Host "Setting artifact name to ${{ parameters.ArtifactName }}-FailedAttempt$(System.JobAttempt) because there were failures."
Write-Host "##vso[task.setvariable variable=PublishArtifactName;]${{ parameters.ArtifactName }}-FailedAttempt$(System.JobAttempt)"
} else {
Write-Host "Setting artifact name to ${{ parameters.ArtifactName }}"
Write-Host "##vso[task.setvariable variable=PublishArtifactName;]${{ parameters.ArtifactName }}"
}
condition: and(succeededOrFailed(), ${{ parameters.CustomCondition }})
displayName: Set Artifact Name $(Agent.JobStatus)
displayName: Set Artifact Name

- task: 1ES.PublishPipelineArtifact@1
condition: and(succeededOrFailed(), ${{ parameters.CustomCondition }})
Expand Down