aboutsummaryrefslogtreecommitdiff
path: root/jenkins/dispatch.groovy
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2017-09-13 15:15:13 -0400
committerGitHub <noreply@github.com>2017-09-13 15:15:13 -0400
commitec9abede5c342aeb4c4d237f81e687a6e7ada20f (patch)
treec99ea9e25eb2c789ef9ac4e384d2b9aaad33005c /jenkins/dispatch.groovy
parentd27ff846a14a658de03548aa0920a3eee160db2c (diff)
parentd037cef84e41cce7555c2ea025397d89a23d94d4 (diff)
downloadbuild_control-ec9abede5c342aeb4c4d237f81e687a6e7ada20f.tar.gz
Merge pull request #31 from rendinam/pkg_pinning0.2.3
Allow pinning build support packages to requested versions...
Diffstat (limited to 'jenkins/dispatch.groovy')
-rw-r--r--jenkins/dispatch.groovy23
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"