diff options
author | Guillaume Tucker <guillaume.tucker@collabora.com> | 2019-07-30 19:05:47 +0100 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2019-08-05 10:19:52 +0100 |
commit | 45c332ff4ebd8b51ce0bdb9718cfff5eba901d81 (patch) | |
tree | c582fa4379f2b3621b1c8af0d9ddd5c3f89fec09 /jenkins/bisect.jpl | |
parent | 4529c475c6691fbf4450633693a159dbb27395f0 (diff) |
bisect.jpl: only keep one kernel build directory
Bisection jobs keep their data in the workspace in order to avoid
having to do a fresh git checkout. However, build diretories can keep
accumulating if they are not removed as there are many possible
combinations of architectures and compilers.
To keep the disk usage under control, remove existing build
directories before starting a bisection except if there is one that
matches exactly the required arch/compiler combination as it may
contain some useful cached data when running similar bisections in a
row.
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins/bisect.jpl')
-rw-r--r-- | jenkins/bisect.jpl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl index c09ca33..f8eb68d 100644 --- a/jenkins/bisect.jpl +++ b/jenkins/bisect.jpl @@ -212,6 +212,12 @@ def buildKernel(kdir, kci_core) { dir(kci_core) { sh(script: "rm -f ${env._BUILD_JSON}") + sh(script: """\ +for d in \$(find ${kdir} -name "build-*" -type d); do + [ "\$d" = "${output}" ] || rm -rf "\$d" +done +""") + sh(script:"""\ ./kci_build \ generate_defconfig_fragments \ |