Version 3.2
π₯ Major Changes π₯
This release changes the syntax for configuring permissions with Configuration as Code, Job DSL, and Pipeline plugins (#145, #144)
Warning
This is a breaking change for anyone currently configuring matrix authorization using these plugins.
In all three cases, the permissions
list has been replaced with the entries
list and a more elaborate element syntax decoupled from the serialized XML configuration format. See examples below for the new syntax.
Configuration as Code
authorizationStrategy:
projectMatrix:
entries:
- user:
name: "admin"
permissions:
- "Overall/Administer"
- group:
name: "authenticated"
permissions:
- "Overall/Read"
Job DSL
properties {
authorizationMatrix {
inheritanceStrategy {
nonInheriting()
}
entries {
group {
name('authenticated')
permissions([
'Job/Read'
])
}
}
}
}
Pipeline
properties([
authorizationMatrix([
group(name: 'authenticated', permissions: ['Job/Read']),
user(name: 'alice', permissions: [
'Job/Configure',
'hudson.scm.SCM.Tag'
])
])
])
For a more comprehensive example of the new configuration syntax for Configuration as Code and Job DSL, see this file. Use the Pipeline Snippet Generator to see the new format for arguments to the authorizationMatrix(β¦)
property.
Note
This change only affects Job DSL configuring jobs using properties/authorizationMatrix
(provided by Matrix Authorization Plugin), not authorization
(provided by Job DSL Plugin). See JENKINS-67411 for known problems with the latter.