diff options
author | Matt Rendina <mrendina@stsci.edu> | 2017-08-09 16:56:44 -0400 |
---|---|---|
committer | Matt Rendina <mrendina@stsci.edu> | 2017-08-09 16:56:44 -0400 |
commit | b18819c26d00d451b33dbd3b0ebab50276ef516d (patch) | |
tree | 1e714d666d0a2f75b6c53ecdfc30e876f71dab0a /jenkins | |
parent | 983fa191385e27fc6bdce85bb6af54796e913800 (diff) | |
download | build_control-b18819c26d00d451b33dbd3b0ebab50276ef516d.tar.gz |
Capture return code
Diffstat (limited to 'jenkins')
-rw-r--r-- | jenkins/dispatch.groovy | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index f610fed..c710597 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -243,8 +243,9 @@ node(LABEL) { stage ("Publish") { def publication_path = "${PUBLICATION_ROOT}/${this.CONDA_PLATFORM}" // Copy and index packages if any were produced in the build. - def artifacts_present = sh(script: "ls ${this.conda_build_output_dir}/*.tar.bz2 >/dev/null 2>&1") - println("artifacts_present: ${artifacts_present}") + def artifacts_present = + sh(script: "ls ${this.conda_build_output_dir}/*.tar.bz2 >/dev/null 2>&1", + returnStatus: true) if (artifacts_present == "0") { sh(script: "rsync -avzr ${this.conda_build_output_dir}/*.tar.bz2 ${publication_path}") // Use a lock file to prevent two dispatch jobs that finish at the same |