[ci]: get build logs when build fails (#7219)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
parent
38258acda3
commit
9fa5a6135c
@ -114,3 +114,12 @@ jobs:
|
||||
- publish: $(System.DefaultWorkingDirectory)/
|
||||
artifact: sonic-buildimage.${{ parameters.platform }}
|
||||
displayName: "Archive sonic image"
|
||||
- script: |
|
||||
set -x
|
||||
find target -name "*.log" | xargs -I{} cp {} $(Build.ArtifactStagingDirectory)/
|
||||
condition: failed()
|
||||
displayName: "Copy build logs"
|
||||
- publish: $(Build.ArtifactStagingDirectory)/
|
||||
artifact: sonic-buildimage.${{ parameters.platform}}.logs@$(System.JobAttempt)
|
||||
displayName: "Archive build logs"
|
||||
condition: failed()
|
||||
|
Reference in New Issue
Block a user