diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2012-10-03 11:08:55 +0300 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2012-10-03 11:08:55 +0300 |
commit | d6d4e8a2df8775aa36725b1f44cd17d5991aa692 (patch) | |
tree | 18a1bae959581270f76826da1b20aeda92493a4f /utils/diskspace | |
parent | 57c7fd7a412e5c97736a0720a99a1546d3c47bb7 (diff) |
Add Groovy script to trigger build expiration in Jenkins.
Diffstat (limited to 'utils/diskspace')
-rw-r--r-- | utils/diskspace/expire-builds.groovy | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/diskspace/expire-builds.groovy b/utils/diskspace/expire-builds.groovy new file mode 100644 index 0000000..fc35135 --- /dev/null +++ b/utils/diskspace/expire-builds.groovy @@ -0,0 +1,19 @@ +// Force build expiration for all Jenkins jobs +// We need this script because by default expires +// jobs only when thay are actually built. + +// Run by going to https://android-build.linaro.org/jenkins/script +// Or using: +// java -jar jenkins-cli.jar -s http://localhost:9090/jenkins/ -i <Jenkins API SSK key> groovy expire.groovy +// This script is expected to run via cron + +for (job in hudson.model.Hudson.instance.items) { + // That's how you print debug info: + // println(job); + + // Be extra cautious about release builds + if (job.name ==~ ".+(201.+|-release)") + continue; + + job.logRotate(); +} |