Jenkinsfile: Automatically clean workspace after building pull requests

coolant-mod
krzys-h 2017-05-21 20:41:01 +02:00
parent b325c53316
commit 4df6d98988
1 changed files with 6 additions and 0 deletions

6
Jenkinsfile vendored
View File

@ -22,4 +22,10 @@ node('master') {
sh 'rm -f data.zip'
zip zipFile: 'data.zip', archive: true, dir: 'build/install'
}
// Clean workspace after building pull requests
// to save disk space on the Jenkins host
if (env.BRANCH_NAME.startsWith('PR-')) {
cleanWs()
}
}