[ci] Fix PR checker archieve artifacts step (#9357) (#10651)

Why I did it
When a failed job retry. Publish artifact will fail for duplicated name
This commit is contained in:
Shilong Liu 2022-04-23 13:57:35 +08:00 committed by GitHub
parent d8fa3eb92f
commit c929c08672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,9 +52,12 @@ jobs:
displayName: Copy Artifacts
condition: always()
- publish: $(Build.ArtifactStagingDirectory)
condition: always()
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
displayName: "Archive sonic image"
- publish: $(Build.ArtifactStagingDirectory)
condition: failed()
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)$(System.JobAttempt)'
displayName: "Archive failed sonic image"
- ${{ parameters.postSteps }}
- template: cleanup.yml
jobGroups: ${{ parameters.jobGroups }}