diff options
Diffstat (limited to 'jenkins')
-rw-r--r-- | jenkins/dispatch.groovy | 15 | ||||
-rw-r--r-- | jenkins/generator_DSL.groovy | 5 | ||||
-rw-r--r-- | jenkins/multi_trigger.groovy | 44 |
3 files changed, 54 insertions, 10 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 493fe72..83635fb 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -275,19 +275,20 @@ node(LABEL) { stage("Generate build list") { // Generate a filtered, optionally culled, & dependency-ordered list // of available package recipes. - def culled_option = "" - if (this.cull_manifest == "true") { - culled_option = "--culled" - } def build_list_file = "build_list" cmd = "rambo" args = ["--platform ${this.CONDA_PLATFORM}", "--python ${PY_VERSION}", "--numpy ${NUMPY_VERSION}", "--manifest manifests/${MANIFEST_FILE}", - "--file ${build_list_file}", - "${culled_option}", - this.recipes_dir] + "--file ${build_list_file}"] + if (this.cull_manifest == "true") { + args.add("--culled") + } + if (this.filter_nonpython == "true") { + args.add("--filter-nonpy") + } + args.add(this.recipes_dir) for (arg in args) { cmd = "${cmd} ${arg}" } diff --git a/jenkins/generator_DSL.groovy b/jenkins/generator_DSL.groovy index 5e0921a..9ddc69a 100644 --- a/jenkins/generator_DSL.groovy +++ b/jenkins/generator_DSL.groovy @@ -71,6 +71,11 @@ for (label in labels) { "Whether or not package recipes that would generate a " + "package file name that already exists in the manfest's" + " channel archive are removed from the build list.") + booleanParam("filter_nonpython", + false, + "Whether or not package without a python dependency are" + + " skipped as they only need to be built on a single" + + " platform.") textParam("supp_env_vars", "", "List of supplemental environment variables to define " + diff --git a/jenkins/multi_trigger.groovy b/jenkins/multi_trigger.groovy index c368c68..1494d40 100644 --- a/jenkins/multi_trigger.groovy +++ b/jenkins/multi_trigger.groovy @@ -9,21 +9,59 @@ node('master') { build_types = [] stage("Trigger") { - for (platform in platforms.tokenize()) { + platforms = platforms.tokenize().sort().reverse() + def os_list = [] + // Compose list of unique OS values. + for (platform in platforms) { + os = platform.tokenize("_")[1] + if (!os_list.contains(os)) { + os_list.add(os) + } + } + // Compose list of master platforms + def master_platforms = [] + for (osval in os_list) { + for (platform in platforms) { + if (platform.contains(osval)) { + master_platforms.add(platform) + break + } + } + } + println("master_platforms: ${master_platforms}") + + for (platform in platforms) { build_type = platform.tokenize("_")[0] + def platname = platform // vars referenced within 'tasks' block + // below must be defined within for loop. build_types += build_type - def platname = platform // must be inside for loop - println("platname = ${platname}") + // Select one platform from each OS to host all package + // builds that do not have any python dependencies. + // The non-python package builds are identical between the + // various python-version-variation job suites, so only + // one platform's build is actually necessary on a given OS. + // The platform selected for this purpose is called the + // 'master' platform and is defined here to be the platform + // name that appears first in a reverse lexicographical + // sorting of the platform names for a given OS. + def filter_nonpython = true + if (master_platforms.contains(platname)) { + filter_nonpython = false + } tasks["${platname}"] = { build_objs["${platname}"] = build( job: "/AstroConda/${platname}/_dispatch", parameters: [ booleanParam(name: 'cull_manifest', value: cull_manifest.toBoolean() + ), + booleanParam(name: 'filter_nonpython', + value: filter_nonpython ) ], propagate: false) } // end tasks + is_master = false } // end for } |