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

Why I did it
When a failed job retry. Publish artifact will fail for duplicated name
This commit is contained in:
Shilong Liu 2021-11-24 14:10:04 +08:00 committed by GitHub
parent 79b8ff52b0
commit 51a0aed02a
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 }}