diff options
Diffstat (limited to 'jenkins/generator_DSL.groovy')
-rw-r--r-- | jenkins/generator_DSL.groovy | 66 |
1 files changed, 42 insertions, 24 deletions
diff --git a/jenkins/generator_DSL.groovy b/jenkins/generator_DSL.groovy index 1a77119..a4b40a8 100644 --- a/jenkins/generator_DSL.groovy +++ b/jenkins/generator_DSL.groovy @@ -10,7 +10,7 @@ def config = yaml.load(readFileFromWorkspace("manifests/${manifest_file}")) //----------------------------------------------------------------------- // Create a folder to contain the jobs which are created below. -suite_name = "${manifest_file.tokenize('.')[0]}_${label}_py${py_version}" +suite_name = "${manifest_file.tokenize(".")[0]}_${label}_py${py_version}" folder(suite_name) @@ -19,17 +19,35 @@ folder(suite_name) // build jobs. pipelineJob("${suite_name}/_dispatch") { - println("label = ${label}") - println("manifest_file = ${manifest_file}") - println("py_version = ${py_version}") + // 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("MANIFEST_FILE = ${manifest_file}") + println("LABEL = ${label}") + println("PY_VERSION = ${py_version}") + println("BUILD_CONTROL_REPO = ${build_control_repo}") + println("CONDA_VERSION = ${conda_version}") + println("CONDA_BUILD_VERSION = ${conda_build_version}") + println("CONDA_BASE_URL = ${conda_base_URL}") + println("UTILS_REPO = ${utils_repo}") environmentVariables { - env("LABEL", "${label}") - env("MANIFEST_FILE", "${manifest_file}") - env("PY_VERSION", "${py_version}") + env("MANIFEST_FILE", manifest_file) + env("LABEL", label) + env("PY_VERSION", py_version) + env("BUILD_CONTROL_REPO", build_control_repo) + 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/dispatch.groovy')) + script(readFileFromWorkspace("jenkins/dispatch.groovy")) sandbox() } } @@ -43,25 +61,25 @@ for(pkg in config.packages) { pipelineJob("${suite_name}/${pkg}") { parameters { - stringParam('label', - 'label-DEFAULTVALUE', - 'The node on which to run.') - 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("label", + "label-DEFAULTVALUE", + "The node on which to run.") + 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.") } definition { cps { - script(readFileFromWorkspace('jenkins/package_builder.groovy')) + script(readFileFromWorkspace("jenkins/package_builder.groovy")) sandbox() } } |