blob: 5f7dcd7a846baf9839fa9057a136c7336e4e1703 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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:8080/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();
}
|