Skip to content

Version 3.2

Compare
Choose a tag to compare
@daniel-beck daniel-beck released this 22 Aug 13:31
· 17 commits to master since this release

πŸ’₯ 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.

Internal Changes πŸ”§

  • Use newer parent POM to allow building on Java 21, also updating the Configuration as Code Plugin dependency from 1647.ve39ca_b_829b_42 to 1670.v564dc8b_982d0 (#147)
  • Remove obsolete code (#149)
  • Address test flakiness in Security2180Test (#150)