Logs will be saved to the job artifacts only in case of failure. (#3110)

* Logs will be saved to the job artifacts only in case of failure.

* Logs will be partly shown at the end in case of failure.

* expiration and parsing
This commit is contained in:
TriplEight
2019-07-15 16:37:31 +02:00
committed by GitHub
parent 5bd806bd9b
commit 84f4d54e53
+14 -3
View File
@@ -154,13 +154,24 @@ test-linux-stable-int:
<<: *test-linux
except:
refs:
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
variables:
- $DEPLOY_TAG
script:
- time RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace
cargo test -p node-cli --release --verbose --locked -- --ignored --test-threads=1
- echo "___Logs will be partly shown at the end in case of failure.___"
- echo "___Full log will be saved to the job artifacts only in case of failure.___"
- RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace
time cargo test -p node-cli --release --verbose --locked -- --ignored --test-threads=1
&> ${CI_COMMIT_SHORT_SHA}_int_failure.log
- sccache -s
after_script:
- awk '/FAILED/,0' ${CI_COMMIT_SHORT_SHA}_int_failure.log
artifacts:
name: $CI_COMMIT_SHORT_SHA
when: on_failure
expire_in: 24 hrs
paths:
- ${CI_COMMIT_SHORT_SHA}_int_failure.log
allow_failure: true