aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jenkins/generator_DSL.groovy17
1 files changed, 17 insertions, 0 deletions
diff --git a/jenkins/generator_DSL.groovy b/jenkins/generator_DSL.groovy
index fe6c8f2..b9a3967 100644
--- a/jenkins/generator_DSL.groovy
+++ b/jenkins/generator_DSL.groovy
@@ -20,6 +20,17 @@ this.build_control_branch= this.build_control_branch.trim()
this.build_control_tag = readFileFromWorkspace("VAR-build_control_tag")
this.build_control_tag = this.build_control_tag.trim()
+// Keep a specified number of builds (purging those older upon next
+// job execution) for each independent job that is created. This value is set
+// as one of the updater job's parameters.
+// Note: Since the _dispatch job is
+// executed at the highest frequency, its saved build logs will not go as far
+// back in time for a given value of builds_to_keep than a similar collection
+// of kept logs for a less frequently built job, a slowly-moving package, for
+// instance.
+println("builds_to_keep: ${builds_to_keep}")
+this.num_builds_to_keep = builds_to_keep.toInteger()
+
// For each label (OS) in the list provided by the 'labels' job parameter, iterate
// over each python version provided by the 'py_versions' job parameter, to obtain
// every combination of OS and python version. Generate a separate job suite for
@@ -55,6 +66,9 @@ for (label in labels.trim().tokenize()) {
"package file name that already exists in the manfest's" +
" channel archive are removed from the build list.")
}
+ logRotator {
+ numToKeep(this.num_builds_to_keep)
+ }
println("\n" +
"script: ${this.script}\n" +
"MANIFEST_FILE: ${manifest_file}\n" +
@@ -102,6 +116,9 @@ for (label in labels.trim().tokenize()) {
env("JOB_DEF_GENERATION_TIME", job_def_generation_time)
env("CONDA_BUILD_VERSION", conda_build_version)
}
+ logRotator {
+ numToKeep(this.num_builds_to_keep)
+ }
parameters {
stringParam("label",
"label-DEFAULTVALUE",