diff options
author | Matt Rendina <rendinam@users.noreply.github.com> | 2018-11-29 13:41:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 13:41:04 -0500 |
commit | b05aedf422e5d291bcd94ad156ae9c1058a06b3f (patch) | |
tree | 98095bae67cafbe3e2603cc6bbd33bb4ac85cc41 | |
parent | 63eb127f7262d5134f2800ab6f32e656b64fe608 (diff) | |
download | jscu_refactor-b05aedf422e5d291bcd94ad156ae9c1058a06b3f.tar.gz |
Ignore status codes from all commands in test_cmds. (#24)
-rw-r--r-- | vars/utils.groovy | 8 |
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") } } } |