How can I configure buildRetention in organizationFolder job type using JobDSL plugin? Is it supported?
I could easily do it in a multibranchPipelineJob but I didn't find a way to do it in organizationFolder.
This is how I did in multibranchPipelineJob:
multibranchPipelineJob('my-job') {
branchSources {
branchSource {
strategy {
allBranchesSame {
props {
buildRetention {
buildDiscarder {
strategy {
logRotator {
daysToKeepStr('3')
numToKeepStr('5')
artifactDaysToKeepStr('3')
artifactNumToKeepStr('5')
}
}
}
}
}
}
}
}
}
}
My env is:
Jenkins version: 2.346.3
JobDSL plugin version: 1.79