Commit 0bdd3e0e authored by Adam Wujek's avatar Adam Wujek

.gitlab-ci.yml: copy logs on build failure

Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 69c53d51
......@@ -29,7 +29,7 @@ stages: # List of stages for jobs, and their order of execution
- release
variables:
_BITSTREAM_DEST: $CI_PROJECT_DIR/$EDL_CI_EOS_OUTPUT_DIR/bitstream
_BITSTREAM_DEST: $CI_PROJECT_DIR/${EDL_CI_EOS_OUTPUT_DIR}bitstream
_FIRMWARE_DEST: $CI_PROJECT_DIR/$EDL_CI_EOS_OUTPUT_DIR/firmware
_TOOLS_DEST: $CI_PROJECT_DIR/$EDL_CI_EOS_OUTPUT_DIR/tools
......@@ -131,6 +131,10 @@ build-wr2rf:
- mkdir -p $_BITSTREAM_DEST
- cp wr2rf.tar.xz $_BITSTREAM_DEST/
after_script:
# Copy logs on failure
- if [ "$CI_JOB_STATUS" == 'failed' ]; then mkdir -p "$_BITSTREAM_DEST"; find "$PWD" -path "$_BITSTREAM_DEST" -prune -o -name '*.log' -exec cp -prv '{}' "$_BITSTREAM_DEST/" ';'; fi
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_ID"
when: always
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment