aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2018-11-29 13:41:04 -0500
committerGitHub <noreply@github.com>2018-11-29 13:41:04 -0500
commitb05aedf422e5d291bcd94ad156ae9c1058a06b3f (patch)
tree98095bae67cafbe3e2603cc6bbd33bb4ac85cc41
parent63eb127f7262d5134f2800ab6f32e656b64fe608 (diff)
downloadjscu_refactor-b05aedf422e5d291bcd94ad156ae9c1058a06b3f.tar.gz
Ignore status codes from all commands in test_cmds. (#24)
-rw-r--r--vars/utils.groovy8
1 files changed, 7 insertions, 1 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy
index d6ee25c..c37ea21 100644
--- a/vars/utils.groovy
+++ b/vars/utils.groovy
@@ -367,7 +367,13 @@ def run(configs, concurrent = true) {
try {
stage("Test (${myconfig.name})") {
for (cmd in myconfig.test_cmds) {
- sh(script: cmd)
+ // Ignore status code from all commands in
+ // test_cmds so Jenkins will always make it
+ // to the post-build stage.
+ // This accommodates tools like pytest returning
+ // !0 codes when a test fails which would
+ // abort the job too early.
+ sh(script: "${cmd} || true")
}
}
}