diff options
author | Matt Rendina <rendinam@users.noreply.github.com> | 2017-08-03 08:48:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-03 08:48:07 -0400 |
commit | 0bb7864a69eb65c582d5c9dc42abe48331e345a1 (patch) | |
tree | 5fa9433ae883f7921dbd76d1f6be60e5e70e6f93 | |
parent | 3c801b4ade4a8a50d43094596e9677b11e50c1be (diff) | |
parent | e5910b6de2686243e33c3a22a8aa04762e886dbb (diff) | |
download | build_control-0bb7864a69eb65c582d5c9dc42abe48331e345a1.tar.gz |
Merge pull request #21 from rendinam/skip_test
Skip test stage if build stage fails
-rw-r--r-- | jenkins/package_builder.groovy | 38 | ||||
-rw-r--r-- | manifests/test.yaml | 12 |
2 files changed, 27 insertions, 23 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 } diff --git a/manifests/test.yaml b/manifests/test.yaml index bc84973..0c626c2 100644 --- a/manifests/test.yaml +++ b/manifests/test.yaml @@ -2,8 +2,10 @@ repository: 'https://github.com/astroconda/astroconda-contrib' channel_URL: 'http://ssb.stsci.edu/astroconda' numpy_version: 1.13 packages: - - mosviz - - specutils - - glueviz - - glue-vispy-viewers - - glue-core + - costools + - crds +# - mosviz +# - specutils +# - glueviz +# - glue-vispy-viewers +# - glue-core |