diff options
author | Matt Rendina <mrendina@stsci.edu> | 2017-08-03 10:37:17 -0400 |
---|---|---|
committer | Matt Rendina <mrendina@stsci.edu> | 2017-08-03 10:37:17 -0400 |
commit | faa8382333c1323c2099893c4ce912c3b283d8d6 (patch) | |
tree | 96b6a183ff64334c4364da98859572039f77cbfa /jenkins | |
parent | dbdeefad893b1a898d3a0ed630fd1340ca2d7240 (diff) | |
download | build_control-faa8382333c1323c2099893c4ce912c3b283d8d6.tar.gz |
File create test
Diffstat (limited to 'jenkins')
-rw-r--r-- | jenkins/dispatch.groovy | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index e4da6ba..338007b 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -23,6 +23,9 @@ this.conda_installers = ["Linux-py2.7":"Miniconda2-${CONDA_VERSION}-Linux-x86_6 "MacOSX-py2.7":"Miniconda2-${CONDA_VERSION}-MacOSX-x86_64.sh", "MacOSX-py3.5":"Miniconda3-${CONDA_VERSION}-MacOSX-x86_64.sh"] +// Conda paths +this.conda_install_dir = "${env.WORKSPACE}/miniconda" + node(LABEL) { this.OSname = null @@ -44,6 +47,8 @@ node(LABEL) { } assert uname != null + this.conda_build_output_dir = "${this.conda_install_dir}/conda-bld/${this.CONDA_PLATFORM}" + env.PYTHONPATH = "" // Make the log files a bit more deterministic env.PYTHONUNBUFFERED = "true" @@ -157,8 +162,8 @@ node(LABEL) { sh dl_cmd // Install specific versions of miniconda and conda-build - sh "bash ./${conda_installer} -b -p miniconda" - env.PATH = "${env.WORKSPACE}/miniconda/bin:${env.PATH}" + sh "bash ./${conda_installer} -b -p ${this.conda_install_dir}" + env.PATH = "${this.conda_install_dir}/bin:${env.PATH}" def cpkgs = "conda=${CONDA_VERSION} conda-build=${CONDA_BUILD_VERSION}" sh "conda install --quiet --yes ${cpkgs} python=${PY_VERSION}" @@ -167,7 +172,7 @@ node(LABEL) { 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.") - def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + + def filename = "${this.conda_install_dir}/lib/python${PY_VERSION}/" + "site-packages/conda_build/config.py" def patches_dir = "${env.WORKSPACE}/patches" def patchname = "conda_build_2.1.1_substr_fix_py${this.py_maj_version}.patch" @@ -233,7 +238,17 @@ node(LABEL) { } stage ("Publication") { - println("PUBLICATION_PATH: ${PUBLICATION_PATH}") + //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 + // time from trampling each other's indexing process. + PrintWriter writer = null + f = new File("${PUBLICATION_PATH}/LOCK-Jenkins") + writer = new PrintWriter(f) + writer.println("Lock file output") + writer.close() + //dir(this.conda_build_output_dir) { + // sh(script: "conda index") + //} } } |