aboutsummaryrefslogtreecommitdiff
path: root/jenkins/package_builder.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/package_builder.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/package_builder.groovy')
-rw-r--r--jenkins/package_builder.groovy41
1 files changed, 28 insertions, 13 deletions
diff --git a/jenkins/package_builder.groovy b/jenkins/package_builder.groovy
index a63c1b8..b7ad786 100644
--- a/jenkins/package_builder.groovy
+++ b/jenkins/package_builder.groovy
@@ -1,3 +1,7 @@
+// Parameters inherited environment injection.
+//----------------------------------------------------------------------------
+// CONDA_BUILD_VERSION - Conda-build is installed forced to this version.
+
this.build_status_file = "${this.parent_workspace}/propagated_build_status"
node(this.label) {
@@ -45,17 +49,7 @@ node(this.label) {
cmd = "conda build"
- // Use channel URL obtained from manifest in build command if
- // manifest has been culled to allow packages being built to
- // simply download dependency packages from the publication
- // channel as needed, rather than build them as part of the
- // package build session that requires them.
- def channel_option = "--channel ${this.channel_URL}"
-
stage("Build") {
- if (this.cull_manifest == "false") {
- channel_option = ""
- }
build_cmd = cmd
args = ["--no-test",
"--no-anaconda-upload",
@@ -64,8 +58,24 @@ node(this.label) {
"--skip-existing",
"--override-channels",
"--channel defaults",
- "${channel_option}",
"--dirty"]
+ // Use channel URL obtained from manifest in build command if
+ // manifest has been culled to allow packages being built to
+ // simply download dependency packages from the publication
+ // channel as needed, rather than build them as part of the
+ // package build session that requires them.
+ if (this.cull_manifest == "true") {
+ args.add("--channel ${this.channel_URL}")
+ }
+ // If conda build 3.x is being used, apply any global package
+ // pin values contained in the 'pin_env' conda environment
+ // created by the dispatch job by using the --bootstrap flag
+ // here.
+ if (CONDA_BUILD_VERSION[0] == "3") {
+ args.add("--old-build-string")
+ args.add("--bootstrap pin_env")
+ }
+ // Compose build command string to use in shell call.
for (arg in args) {
build_cmd = "${build_cmd} ${arg}"
}
@@ -90,8 +100,13 @@ node(this.label) {
"--python=${this.py_version}",
"--numpy=${this.numpy_version}",
"--override-channels",
- "--channel defaults",
- "${channel_option}"]
+ "--channel defaults"]
+ if (this.cull_manifest == "true") {
+ args.add("--channel ${this.channel_URL}")
+ }
+ if (CONDA_BUILD_VERSION[0] == "3") {
+ args.add("--old-build-string")
+ }
for (arg in args) {
build_cmd = "${build_cmd} ${arg}"
}