aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2017-09-25 12:05:44 -0400
committerGitHub <noreply@github.com>2017-09-25 12:05:44 -0400
commit381268c5954e9b04fac28f57dd8fd7c9b3d923ef (patch)
treeb7278d0a68e9f80d4f668d245bfd2a389e0c3a64
parent5625f45f06fd424794b388718a5c47ab47e5b121 (diff)
parent870c8fc73ca88fe7d3a3822d5a52d4ebd54e85a1 (diff)
downloadbuild_control-381268c5954e9b04fac28f57dd8fd7c9b3d923ef.tar.gz
Merge pull request #38 from rendinam/param_consolidation
Pin versions based on presence of list
-rw-r--r--jenkins/dispatch.groovy37
-rw-r--r--jenkins/generator_DSL.groovy8
-rw-r--r--jenkins/job-suite-generator.groovy2
-rw-r--r--jenkins/version_pins.yml4
-rw-r--r--manifests/dev-test.yaml5
5 files changed, 28 insertions, 28 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy
index 36df8ee..2114212 100644
--- a/jenkins/dispatch.groovy
+++ b/jenkins/dispatch.groovy
@@ -212,24 +212,27 @@ node(LABEL) {
sh "patch ${filename} ${full_patchname}"
}
+ // Determine if version_pins_file has a list of packages to pin.
+ try {
+ this.pins_file.packages
+ this.use_version_pins = "true"
+ } catch(MissingPropertyException) {
+ println("${this.version_pins_file} has no packages list, skipping pin environment creation.")
+ this.use_version_pins = "false"
+ }
+
// (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}"
- this.use_version_pins = false
- // This test requires script approval for signature:
- // org.codehaus.groovy.runtime.DefaultGroovyMethods
- // hasProperty java.lang.Object java.lang.String
- if (this.pins_file.hasProperty('packages')) {
- this.use_version_pins = true
- }
- if (CONDA_BUILD_VERSION[0] == "3" && this.use_version_pins) {
+ // building packages via the --bootstrap flag. Environment creation is done
+ // using the explicit packages and versions in the pin file, with no
+ // dependencies.
+ if (CONDA_BUILD_VERSION[0] == "3" && this.use_version_pins == "true") {
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}"
+ "specification. Packages to be installed in pin environment:")
+ println(this.pins_file.packages)
+ def env_cmd = "conda create --quiet --no-deps -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}"
@@ -284,13 +287,9 @@ node(LABEL) {
string(name: "numpy_version", value: NUMPY_VERSION),
string(name: "parent_workspace", value: env.WORKSPACE),
string(name: "manifest_file", value: MANIFEST_FILE),
- [$class: 'BooleanParameterValue',
- name: "cull_manifest",
- value: this.cull_manifest.toBoolean()],
+ string(name: "cull_manifest", value: this.cull_manifest),
string(name: "channel_URL", value: this.manifest.channel_URL),
- [$class: 'BooleanParameterValue',
- name: "use_version_pins",
- value: this.use_version_pins.toBoolean()]
+ string(name: "use_version_pins", value: this.use_version_pins),
]
// toBoolean java.lang.Boolean above equires script approval
propagate: false
diff --git a/jenkins/generator_DSL.groovy b/jenkins/generator_DSL.groovy
index 82503c9..fe6c8f2 100644
--- a/jenkins/generator_DSL.groovy
+++ b/jenkins/generator_DSL.groovy
@@ -127,14 +127,14 @@ for (label in labels.trim().tokenize()) {
stringParam("manifest_file",
"manifest_file-DEFAULTVALUE",
"Manifest (release) file to use for the build.")
- booleanParam("cull_manifest",
- false,
+ stringParam("cull_manifest",
+ "false",
"Was the manifest culled as part of dispatch?")
stringParam("channel_URL",
"channel_URL-DEFAULTVALUE",
"Publication channel used for culled builds.")
- booleanParam("use_version_pins",
- false,
+ stringParam("use_version_pins",
+ "false",
"Whether or not to use global version pins.")
}
definition {
diff --git a/jenkins/job-suite-generator.groovy b/jenkins/job-suite-generator.groovy
index 6a87bab..2ce1453 100644
--- a/jenkins/job-suite-generator.groovy
+++ b/jenkins/job-suite-generator.groovy
@@ -23,7 +23,7 @@ node("master") {
stage("Prep") {
- sh "printenv"
+ sh "env | sort"
// Delete any existing job workspace directory contents.
deleteDir()
diff --git a/jenkins/version_pins.yml b/jenkins/version_pins.yml
index 2d6f23e..b06556d 100644
--- a/jenkins/version_pins.yml
+++ b/jenkins/version_pins.yml
@@ -12,5 +12,5 @@
# - setuptools can be pinned to an earlier version for all package builds
# that happen in a given job suite, allowing them to succeed.
#
-#packages:
-# - setuptools 27.2.0
+packages:
+ - setuptools 27.2.0
diff --git a/manifests/dev-test.yaml b/manifests/dev-test.yaml
index cad5d5a..2d6be21 100644
--- a/manifests/dev-test.yaml
+++ b/manifests/dev-test.yaml
@@ -8,8 +8,9 @@ channel_URL: 'http://ssb.stsci.edu/astroconda-dev'
publication_root: '/eng/ssb/websites/ssbpublic/astroconda-j-dev-staging'
packages:
# - drizzlepac
- - jwst_gtvt
- - jwst
+# - jwst_gtvt
+# - jwst
+ - pandokia
# - crds
# - cube-tools
# - sphinxcontrib-programoutput