diff options
author | Matt Rendina <mrendina@stsci.edu> | 2017-08-03 08:26:24 -0400 |
---|---|---|
committer | Matt Rendina <mrendina@stsci.edu> | 2017-08-03 08:26:24 -0400 |
commit | c24cc049d165cec7f5b61b515df5c8b0541f6396 (patch) | |
tree | 80501dd75ae11a2eb735b3259c8cdf01c39e5f89 | |
parent | 3c801b4ade4a8a50d43094596e9677b11e50c1be (diff) | |
download | build_control-c24cc049d165cec7f5b61b515df5c8b0541f6396.tar.gz |
Skip test stage
-rw-r--r-- | jenkins/package_builder.groovy | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/jenkins/package_builder.groovy b/jenkins/package_builder.groovy index c05ac00..8ddbe9f 100644 --- a/jenkins/package_builder.groovy +++ b/jenkins/package_builder.groovy @@ -80,27 +80,29 @@ node(this.label) { } } - stage("Test") { - build_cmd = cmd - args = ["--test", - "--python=${this.py_version}", - "--numpy=${this.numpy_version}"] - for (arg in args) { - build_cmd = "${build_cmd} ${arg}" - } - stat = 999 - stat = sh(script: "${build_cmd} ${env.JOB_BASE_NAME}", - returnStatus: true) - if (stat != 0) { - currentBuild.result = "UNSTABLE" - // Ratchet up the overall build status severity if this - // is the most severe seen so far. - if (build_status == "SUCCESS") { - sh "echo ${currentBuild.result} > ${this.build_status_file}" + // Skip test stage if build stage has failed. + if (currentBuild.result != "FAILURE") { + stage("Test") { + build_cmd = cmd + args = ["--test", + "--python=${this.py_version}", + "--numpy=${this.numpy_version}"] + for (arg in args) { + build_cmd = "${build_cmd} ${arg}" + } + stat = 999 + stat = sh(script: "${build_cmd} ${env.JOB_BASE_NAME}", + returnStatus: true) + if (stat != 0) { + currentBuild.result = "UNSTABLE" + // Ratchet up the overall build status severity if this + // is the most severe seen so far. + if (build_status == "SUCCESS") { + sh "echo ${currentBuild.result} > ${this.build_status_file}" + } } } } - } // end dir } |