From 0bb1a8d16ed3cf04cf2b7c8541449fb55d2727e9 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 10 Aug 2017 17:16:13 -0400 Subject: Check on version string capture --- jenkins/dispatch.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 551bad4..cc86232 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -172,6 +172,7 @@ node(LABEL) { // Apply bugfix patch only to conda_build 2.x def conda_build_version = sh(script: "conda-build --version", returnStdout: true) + println(" **>> conda_build_version = ${conda_build_version}") 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.") -- cgit From c6de140a73057d7961d652a5fe3d56a9122ba308 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 10 Aug 2017 17:25:57 -0400 Subject: Trim stdout of conda-build version call --- jenkins/dispatch.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index cc86232..2d9fb59 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -171,7 +171,7 @@ 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) + def conda_build_version = sh(script: "conda-build --version", returnStdout: true).trim() println(" **>> conda_build_version = ${conda_build_version}") def conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] if (conda_build_maj_ver == "2") { -- cgit From 0ab20757b2d5297d4d1ad4fff16b66fb0b43e98a Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 10 Aug 2017 17:39:23 -0400 Subject: Redirect stderr to stdout so it can be captured when running py2 version of conda-build --- jenkins/dispatch.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 2d9fb59..de7342e 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -171,7 +171,7 @@ 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).trim() + def conda_build_version = sh(script: "conda-build --version 2>&1", returnStdout: true).trim() println(" **>> conda_build_version = ${conda_build_version}") def conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] if (conda_build_maj_ver == "2") { -- cgit From c806de29f1ffe5bf81c85b951b461ae382db39a1 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 10 Aug 2017 17:42:12 -0400 Subject: cleanup --- jenkins/dispatch.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index de7342e..1b86060 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -171,8 +171,10 @@ node(LABEL) { sh "conda install --quiet --yes ${cpkgs} python=${PY_VERSION}" // Apply bugfix patch only to conda_build 2.x + // 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() - println(" **>> conda_build_version = ${conda_build_version}") 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.") -- cgit From 5a7b1030115057f0448007db8bd5bb0a5d27aadb Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 10 Aug 2017 17:47:15 -0400 Subject: Better publication status output --- jenkins/dispatch.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 1b86060..3c4ac1a 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -249,7 +249,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 @@ -275,6 +274,8 @@ node(LABEL) { } sh(script: "rm -f ${lockfile}") } + } else { + println("No build artifacts found.") } } } -- cgit From 2a358f2f31662cac2f06f755c6070e7817708298 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 10 Aug 2017 17:53:28 -0400 Subject: Generalize miniconda installer selection --- jenkins/dispatch.groovy | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 3c4ac1a..c3c701d 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 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 -- cgit From 1353a89c447bccaea6520750d08bf658380ea249 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Thu, 10 Aug 2017 21:04:54 -0400 Subject: Remove sleep delay scale factor --- jenkins/dispatch.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index c3c701d..6dec068 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -262,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 } -- cgit