-
Improvement
-
Resolution: Fixed
-
Minor
-
None
In order to set `blocksInheritance` in the authorization closure we need to use the configure block
job.groovy
freeStyleJob('maintenance/jenkins-seed') { displayName('Jenkins Jobs Seed') concurrentBuild(allowConcurrentBuild = true) configure { job_properties = it.get('properties').get(0) auth_matrix = job_properties.appendNode('hudson.security.AuthorizationMatrixProperty') auth_matrix.appendNode('blocksInheritance').setValue(true) } }
Would be nice to have something like:
job.groovy
freeStyleJob('maintenance/jenkins-seed') { displayName('Jenkins Jobs Seed') concurrentBuild(allowConcurrentBuild = true) authorization { blocksInheritance(true) } }