I've been at this for a while and haven't gotten much traction, here's where I left off:
(add-multibranch-pipeline-job.groovy)
.
.
.
BuildRetentionBranchProperty buildRetentionBranchProperty = new BuildRetentionBranchProperty(
new LogRotator( 4, 5, 3, 2)
)
NamedExceptionsBranchPropertyStrategy.Named nebrs_d = new NamedExceptionsBranchPropertyStrategy.Named("discard", buildRetentionBranchProperty)
NamedExceptionsBranchPropertyStrategy.Named[] nebpsa = [ nebrs_d ]
BranchProperty[] bpa = [buildRetentionBranchProperty]
NamedExceptionsBranchPropertyStrategy nebps = new NamedExceptionsBranchPropertyStrategy(bpa, nebpsa)
branchSource.setStrategy()
.
.
.
PersistedList sources = mbp.getSourcesList()
sources.clear()
sources.add(branchSource)
Thanks for sharing these script, btw!
I've been at this for a while and haven't gotten much traction, here's where I left off:
(
add-multibranch-pipeline-job.groovy)Thanks for sharing these script, btw!