Jenkinsfile: Don't keep artifacts for old PR builds
parent
4df6d98988
commit
d54f880e5e
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env groovy
|
||||
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '30', artifactNumToKeepStr: '10']]])
|
||||
if (env.BRANCH_NAME.startsWith('PR-')) {
|
||||
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactNumToKeepStr: '1']]])
|
||||
} else {
|
||||
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '30', artifactNumToKeepStr: '5']]])
|
||||
}
|
||||
|
||||
node('master') {
|
||||
stage('Pull changes') {
|
||||
|
|
Loading…
Reference in New Issue