aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <mrendina@stsci.edu>2017-09-05 17:27:35 -0400
committerMatt Rendina <mrendina@stsci.edu>2017-09-05 17:27:35 -0400
commit9c948b7080834c91d52e0bf70b78aff0facda733 (patch)
tree62bb40bc077780f5bdde47a76a36c1bb7e53edfb
parent8554f6dc67e19618d3d69ba315ad7a2c04ba83a2 (diff)
downloadbuild_control-9c948b7080834c91d52e0bf70b78aff0facda733.tar.gz
Add numpy parameter to job suite generation 'matrix'
-rw-r--r--jenkins/dispatch.groovy6
-rw-r--r--jenkins/generator_DSL.groovy206
-rw-r--r--jenkins/job-suite-generator.groovy1
3 files changed, 110 insertions, 103 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy
index 3e17ac1..9fcf805 100644
--- a/jenkins/dispatch.groovy
+++ b/jenkins/dispatch.groovy
@@ -101,6 +101,7 @@ node(LABEL) {
"LABEL: ${LABEL}\n" +
"env.NODE_NAME: ${env.NODE_NAME}\n" +
"PY_VERSION: ${PY_VERSION}\n" +
+ "NUMPY_VERSION: ${NUMPY_VERSION}\n" +
"MANIFEST_FILE: ${MANIFEST_FILE}\n" +
"CONDA_VERSION: ${CONDA_VERSION}\n" +
"CONDA_BUILD_VERSION: ${CONDA_BUILD_VERSION}\n" +
@@ -237,8 +238,9 @@ node(LABEL) {
string(name: "build_control_repo", value: BUILD_CONTROL_REPO),
string(name: "build_control_branch", value: BUILD_CONTROL_BRANCH),
string(name: "py_version", value: PY_VERSION),
- string(name: "numpy_version",
- value: "${this.manifest.numpy_version}"),
+ //string(name: "numpy_version",
+ // value: "${this.manifest.numpy_version}"),
+ string(name: "numpy_version", value: NUMPY_VERSION),
string(name: "parent_workspace", value: env.WORKSPACE),
string(name: "cull_manifest", value: this.cull_manifest),
string(name: "channel_URL", value: this.manifest.channel_URL)],
diff --git a/jenkins/generator_DSL.groovy b/jenkins/generator_DSL.groovy
index 36f65d5..beb4160 100644
--- a/jenkins/generator_DSL.groovy
+++ b/jenkins/generator_DSL.groovy
@@ -26,118 +26,122 @@ this.build_control_tag = this.build_control_tag.trim()
// each combination.
for (label in labels.trim().tokenize()) {
for (py_version in py_versions.trim().tokenize()) {
-
- //-----------------------------------------------------------------------
- // Create a folder to contain the jobs which are created below.
-
- suite_name = "${manifest_file.tokenize(".")[0]}_${label}_py${py_version}"
- folder(suite_name) {
- description("Build suite generated: ${job_def_generation_time}\n" +
- "build control repo: ${build_control_repo}\n" +
- "build control branch: ${build_control_branch}\n" +
- "build control tag: ${build_control_tag}\n" +
- "conda version: ${conda_version}\n" +
- "conda-build version: ${conda_build_version}\n" +
- "utils_repo: ${utils_repo}")
- }
-
- //-----------------------------------------------------------------------
- // Generate the dispatch job that will trigger the chain of package
- // build jobs.
- pipelineJob("${suite_name}/_${script.tokenize(".")[0]}") {
- // At trigger-time, allow for setting manifest culling behavior.
- parameters {
- booleanParam("cull_manifest",
- true,
- "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.")
- }
- println("\n" +
- "script: ${this.script}\n" +
- "MANIFEST_FILE: ${manifest_file}\n" +
- "LABEL: ${label}\n" +
- "PY_VERSION: ${py_version}\n" +
- "BUILD_CONTROL_REPO: ${build_control_repo}\n" +
- "BUILD_CONTROL_BRANCH: ${build_control_branch}\n" +
- "BUILD_CONTROL_TAG: ${build_control_tag}\n" +
- "CONDA_VERSION: ${conda_version}\n" +
- "CONDA_BUILD_VERSION: ${conda_build_version}\n" +
- "CONDA_BASE_URL: ${conda_base_URL}\n" +
- "UTILS_REPO: ${utils_repo}\n")
- environmentVariables {
- env("JOB_DEF_GENERATION_TIME", job_def_generation_time)
- env("SCRIPT", this.script)
- env("MANIFEST_FILE", manifest_file)
- env("LABEL", label)
- env("PY_VERSION", py_version)
- env("BUILD_CONTROL_REPO", build_control_repo)
- env("BUILD_CONTROL_BRANCH", build_control_branch)
- env("BUILD_CONTROL_TAG", build_control_tag)
- env("CONDA_VERSION", conda_version)
- env("CONDA_BUILD_VERSION", conda_build_version)
- env("CONDA_BASE_URL", conda_base_URL)
- env("UTILS_REPO", utils_repo)
+ for (numpy_version in numpy_versions.trim().tokenize()) {
+
+ //-----------------------------------------------------------------------
+ // Create a folder to contain the jobs which are created below.
+
+ suite_name = "${manifest_file.tokenize(".")[0]}_${label}_py${py_version}_np${numpy_version}"
+ folder(suite_name) {
+ description("Build suite generated: ${job_def_generation_time}\n" +
+ "build control repo: ${build_control_repo}\n" +
+ "build control branch: ${build_control_branch}\n" +
+ "build control tag: ${build_control_tag}\n" +
+ "conda version: ${conda_version}\n" +
+ "conda-build version: ${conda_build_version}\n" +
+ "utils_repo: ${utils_repo}")
}
- definition {
- cps {
- script(readFileFromWorkspace("jenkins/${this.script}"))
- sandbox()
- }
- }
- }
-
- //-----------------------------------------------------------------------
- // Generate the series of actual package building jobs.
-
- for(pkg in config.packages) {
-
- pipelineJob("${suite_name}/${pkg}") {
+ //-----------------------------------------------------------------------
+ // Generate the dispatch job that will trigger the chain of package
+ // build jobs.
+ pipelineJob("${suite_name}/_${script.tokenize(".")[0]}") {
+ // At trigger-time, allow for setting manifest culling behavior.
+ parameters {
+ booleanParam("cull_manifest",
+ true,
+ "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.")
+ }
+ println("\n" +
+ "script: ${this.script}\n" +
+ "MANIFEST_FILE: ${manifest_file}\n" +
+ "LABEL: ${label}\n" +
+ "PY_VERSION: ${py_version}\n" +
+ "NUMPY_VERSION: ${numpy_version}\n" +
+ "BUILD_CONTROL_REPO: ${build_control_repo}\n" +
+ "BUILD_CONTROL_BRANCH: ${build_control_branch}\n" +
+ "BUILD_CONTROL_TAG: ${build_control_tag}\n" +
+ "CONDA_VERSION: ${conda_version}\n" +
+ "CONDA_BUILD_VERSION: ${conda_build_version}\n" +
+ "CONDA_BASE_URL: ${conda_base_URL}\n" +
+ "UTILS_REPO: ${utils_repo}\n")
environmentVariables {
env("JOB_DEF_GENERATION_TIME", job_def_generation_time)
- }
- parameters {
- stringParam("label",
- "label-DEFAULTVALUE",
- "The node on which to run.")
- stringParam("build_control_repo",
- "build_control_repo-DEFAULTVALUE",
- "Repository containing the build system scripts.")
- stringParam("build_control_branch",
- "build_control_branch-DEFAULTVALUE",
- "Branch checked out to obtain build system scripts.")
- stringParam("build_control_tag",
- "build_control_tag-DEFAULTVALUE",
- "Tag checked out to obtain build system scripts.")
- stringParam("py_version",
- "py_version-DEFAULTVALUE",
- "python version to use")
- stringParam("numpy_version",
- "numpy_version-DEFAULTVALUE",
- "Version of numpy to use")
- stringParam("parent_workspace",
- "parent_workspace-DEFAULTVALUE",
- "The workspace dir of the dispatch job")
- stringParam("manifest_file",
- "manifest_file-DEFAULTVALUE",
- "Manifest (release) file to use for the build.")
- stringParam("cull_manifest",
- "cull_manifest-DEFAULTVALUE",
- "Was the manifest culled as part of dispatch?")
- stringParam("channel_URL",
- "channel_URL-DEFAULTVALUE",
- "Publication channel used for culled builds.")
+ env("SCRIPT", this.script)
+ env("MANIFEST_FILE", manifest_file)
+ env("LABEL", label)
+ env("PY_VERSION", py_version)
+ env("NUMPY_VERSION", numpy_version)
+ env("BUILD_CONTROL_REPO", build_control_repo)
+ env("BUILD_CONTROL_BRANCH", build_control_branch)
+ env("BUILD_CONTROL_TAG", build_control_tag)
+ env("CONDA_VERSION", conda_version)
+ env("CONDA_BUILD_VERSION", conda_build_version)
+ env("CONDA_BASE_URL", conda_base_URL)
+ env("UTILS_REPO", utils_repo)
}
definition {
cps {
- script(readFileFromWorkspace("jenkins/package_builder.groovy"))
+ script(readFileFromWorkspace("jenkins/${this.script}"))
sandbox()
}
}
- } // end pipelineJob
+ }
+
+
+ //-----------------------------------------------------------------------
+ // Generate the series of actual package building jobs.
+
+ for(pkg in config.packages) {
+
+ pipelineJob("${suite_name}/${pkg}") {
+ environmentVariables {
+ env("JOB_DEF_GENERATION_TIME", job_def_generation_time)
+ }
+ parameters {
+ stringParam("label",
+ "label-DEFAULTVALUE",
+ "The node on which to run.")
+ stringParam("build_control_repo",
+ "build_control_repo-DEFAULTVALUE",
+ "Repository containing the build system scripts.")
+ stringParam("build_control_branch",
+ "build_control_branch-DEFAULTVALUE",
+ "Branch checked out to obtain build system scripts.")
+ stringParam("build_control_tag",
+ "build_control_tag-DEFAULTVALUE",
+ "Tag checked out to obtain build system scripts.")
+ stringParam("py_version",
+ "py_version-DEFAULTVALUE",
+ "python version to use")
+ stringParam("numpy_version",
+ "numpy_version-DEFAULTVALUE",
+ "Version of numpy to use")
+ stringParam("parent_workspace",
+ "parent_workspace-DEFAULTVALUE",
+ "The workspace dir of the dispatch job")
+ stringParam("manifest_file",
+ "manifest_file-DEFAULTVALUE",
+ "Manifest (release) file to use for the build.")
+ stringParam("cull_manifest",
+ "cull_manifest-DEFAULTVALUE",
+ "Was the manifest culled as part of dispatch?")
+ stringParam("channel_URL",
+ "channel_URL-DEFAULTVALUE",
+ "Publication channel used for culled builds.")
+ }
+ definition {
+ cps {
+ script(readFileFromWorkspace("jenkins/package_builder.groovy"))
+ sandbox()
+ }
+ }
+ } // end pipelineJob
- } //end for(pkg...
+ } //end for(pkg...
+ } //end for(numpy_version
} // end for(py_version
} // end for(label
diff --git a/jenkins/job-suite-generator.groovy b/jenkins/job-suite-generator.groovy
index 7a2546d..6a87bab 100644
--- a/jenkins/job-suite-generator.groovy
+++ b/jenkins/job-suite-generator.groovy
@@ -72,6 +72,7 @@ node("master") {
"manifest_file: ${this.manifest_file}\n" +
"labels: ${this.labels}\n" +
"py_versions: ${this.py_versions}\n" +
+ "numpy_versions: ${this.numpy_versions}\n" +
"conda_version: ${this.conda_version}\n" +
"conda_build_version: ${this.conda_build_version}\n" +
"conda_base_URL: ${this.conda_base_URL}\n" +