ci: use pipefail to actually catch test errors
Because otherwise when piping optput to `tee` the exit code that affects the result of the whole `sh` call is the last command in the pipe. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
bf346147e9
commit
3f47fb6bf6
|
@ -54,10 +54,20 @@ pipeline {
|
|||
stage('Checks') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps { sh "make lint 2>&1 | tee ${LOG_FILE}" }
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make lint 2>&1 | tee ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Tests') {
|
||||
steps { sh "make test 2>&1 | tee -a ${LOG_FILE}" }
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make test 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue