aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2017-08-11 08:17:30 -0400
committerGitHub <noreply@github.com>2017-08-11 08:17:29 -0400
commit75651d3748df93ddc7feb70dfae92850e49fcc0f (patch)
tree2f75947cc9d4e8869baf2c06e841e5e0e98adf7c
parent41a33047180f77c1a47d6ff3304073907dd108ef (diff)
parent1353a89c447bccaea6520750d08bf658380ea249 (diff)
downloadbuild_control-75651d3748df93ddc7feb70dfae92850e49fcc0f.tar.gz
Merge pull request #23 from rendinam/comb_test0.1.0
Generalize for python versions
-rw-r--r--jenkins/dispatch.groovy22
1 files changed, 14 insertions, 8 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy
index 551bad4..6dec068 100644
--- a/jenkins/dispatch.groovy
+++ b/jenkins/dispatch.groovy
@@ -18,10 +18,10 @@ this.recipes_dir = "conda-recipes"
this.build_status_file = "propagated_build_status"
// The conda installer script to use for various <OS><py_version> combinations.
-this.conda_installers = ["Linux-py2.7":"Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh",
- "Linux-py3.5":"Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh",
- "MacOSX-py2.7":"Miniconda2-${CONDA_VERSION}-MacOSX-x86_64.sh",
- "MacOSX-py3.5":"Miniconda3-${CONDA_VERSION}-MacOSX-x86_64.sh"]
+this.conda_installers = ["Linux-py2":"Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh",
+ "Linux-py3":"Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh",
+ "MacOSX-py2":"Miniconda2-${CONDA_VERSION}-MacOSX-x86_64.sh",
+ "MacOSX-py3":"Miniconda3-${CONDA_VERSION}-MacOSX-x86_64.sh"]
// Values controlling the conda index stage which happens after any packages are created.
this.max_publication_tries = 5
@@ -159,8 +159,10 @@ node(LABEL) {
sh "false"
}
+ //def conda_installer =
+ // this.conda_installers["${this.OSname}-py${PY_VERSION}"]
def conda_installer =
- this.conda_installers["${this.OSname}-py${PY_VERSION}"]
+ this.conda_installers["${this.OSname}-py${this.py_maj_version}"]
dl_cmd = dl_cmd + " ${CONDA_BASE_URL}/${conda_installer}"
sh dl_cmd
@@ -171,7 +173,10 @@ node(LABEL) {
sh "conda install --quiet --yes ${cpkgs} python=${PY_VERSION}"
// Apply bugfix patch only to conda_build 2.x
- def conda_build_version = sh(script: "conda-build --version", returnStdout: true)
+ // py2 conda-build outputs version string to stderr
+ // whereas the py3 version outputs it to stdout. Merge output streams here to capture
+ // all output under both circumstances.
+ def conda_build_version = sh(script: "conda-build --version 2>&1", returnStdout: true).trim()
def conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0]
if (conda_build_maj_ver == "2") {
println("conda-build major version ${conda_build_maj_ver} detected. Applying bugfix patch.")
@@ -246,7 +251,6 @@ node(LABEL) {
def artifacts_present =
sh(script: "ls ${this.conda_build_output_dir}/*.tar.bz2 >/dev/null 2>&1",
returnStatus: true)
- println("artifacts present = ${artifacts_present}")
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
@@ -258,7 +262,7 @@ node(LABEL) {
println("Lockfile already exists, waiting for it to be released...")
while ( tries_remaining > 0) {
println("Waiting ${this.publication_lock_wait_s}s for lockfile release...")
- sleep(this.publication_lock_wait_s * 1000)
+ sleep(this.publication_lock_wait_s)
if ( !file.exists() ) {
break
}
@@ -272,6 +276,8 @@ node(LABEL) {
}
sh(script: "rm -f ${lockfile}")
}
+ } else {
+ println("No build artifacts found.")
}
}
}