diff options
author | Matt Rendina <mrendina@stsci.edu> | 2017-09-08 12:31:26 -0400 |
---|---|---|
committer | Matt Rendina <mrendina@stsci.edu> | 2017-09-13 15:08:42 -0400 |
commit | d037cef84e41cce7555c2ea025397d89a23d94d4 (patch) | |
tree | c99ea9e25eb2c789ef9ac4e384d2b9aaad33005c /jenkins/dispatch.groovy | |
parent | d27ff846a14a658de03548aa0920a3eee160db2c (diff) | |
download | build_control-d037cef84e41cce7555c2ea025397d89a23d94d4.tar.gz |
Allow pinning specific build-support packages to requested versions under conda-build 3.x.
Diffstat (limited to 'jenkins/dispatch.groovy')
-rw-r--r-- | jenkins/dispatch.groovy | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 80cfe89..a1e91cd 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -27,6 +27,10 @@ this.conda_installers = ["Linux-py2":"Miniconda2-${CONDA_VERSION}-Linux-x86_64. this.max_publication_tries = 5 this.publication_lock_wait_s = 10 +// Name of YAML file that contains global pinning information to use during the build. +// Packages that appear in this file will be pinned to the version indicated. +this.version_pins_file = "version_pins.yml" + node(LABEL) { this.OSname = null @@ -76,6 +80,8 @@ node(LABEL) { this.manifest.channel_URL = this.manifest.channel_URL[0..-2] } + this.pins_file = readYaml file: "jenkins/${this.version_pins_file}" + // Allow for sharing build_list between stages below. this.build_list = [] @@ -195,6 +201,23 @@ node(LABEL) { sh "patch ${filename} ${full_patchname}" } + // (conda-build 3.x only) + // Create and populate environment to be used for pinning reference when + // building packages via the --bootstrap flag. + // sh "conda create --name pin_env python=${PY_VERSION}" + if (CONDA_BUILD_VERSION[0] == "3") { + println("Creating environment based on package pin values found \n" + + "in ${this.version_pins_file} to use as global version pinnning \n" + + "specification.") + def env_cmd = "conda create --quiet -n pin_env python=${PY_VERSION}" + for (pkg in this.pins_file.packages) { + // TODO: Don't let conda components update here. + env_cmd = "${env_cmd} ${pkg.tokenize()[0]}=${pkg.tokenize()[1]}" + } + sh "${env_cmd}" + sh "source activate pin_env; conda env list; conda list" + } + // Install support tools dir(this.utils_dir) { sh "python setup.py install" |