[ci] Publish logs when building image job is canceled by timeout. (#10919) (#16433)

This commit is contained in:
mssonicbld 2023-09-04 16:34:07 +08:00 committed by GitHub
parent 5b6a935f99
commit 99ace99ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ jobs:
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
displayName: "Archive sonic image"
- publish: $(Build.ArtifactStagingDirectory)
condition: failed()
condition: or(failed(), canceled())
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)$(System.JobAttempt)'
displayName: "Archive failed sonic image"
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: