Skip to contentSkip to conversation

CI: save task logs when a job fails

PATCH Applied Ross Burton 2 participants 2 messages Mar 22, 2022 – Mar 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CI: save task logs when a job fails

Create a job artifact containing all of the task logs if the job fails.

---
 .gitlab-ci.yml | 5 +++++
 1 file changed, 5 insertions(+)
.gitlab-ci.yml +5 -0
index 13195930..7883d35f 100644
@@ -35,6 +35,11 @@ stages:
     - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
     - kas build $KASFILES
     - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
+  artifacts:
+    name: "logs"
+    when: on_failure
+    paths:
+      - $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.*
 
 # Workaround for Zephyr not currectly handling TESTIMAGE_AUTO
 .build_and_test:
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 1 line · Ross Burton

Create a job artifact containing all of the task logs if the job fails.

Applied, thanks!

[1/1] CI: save task logs when a job fails

      commit: 28acb5fbd4cd01db3673d700b49c5a6ed12da3eb

Best regards,

Signature · 1 line
Jon Mason <[email protected]>