Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68648

JCasC integraton broken

XMLWordPrintable

      The following example configuration:

      jenkins:
        authorizationStrategy:
          roleBased:
            roles:
              global:
                - name: admin
                  description: "Role admin"
                  pattern: ".*"
                  assignments:
                    - "g_jenkins_admin"
                  permissions:
                    - "Agent/Build"
                    - "Agent/Configure"
                    - "Agent/Connect"
                    - "Agent/Create"
                    - "Agent/Delete"
                    - "Agent/Disconnect"
                    - "Agent/Provision"
                    - "Credentials/Create"
                    - "Credentials/Delete"
                    - "Credentials/ManageDomains"
                    - "Credentials/Update"
                    - "Credentials/View"
                    - "Job/Build"
                    - "Job/Cancel"
                    - "Job/Configure"
                    - "Job/Create"
                    - "Job/Delete"
                    - "Job/Discover"
                    - "Job/Move"
                    - "Job/Read"
                    - "Job/Workspace"
                    - "Lockable Resources/Reserve"
                    - "Lockable Resources/Unlock"
                    - "Overall/Administer"
                    - "Overall/Read"
                    - "Run/Delete"
                    - "Run/Replay"
                    - "Run/Update"
                    - "SCM/Tag"
                    - "View/Configure"
                    - "View/Create"
                    - "View/Delete"
                    - "View/Read"
              items:
                - name: role_acd
                  description: "Role role_acd"
                  pattern: "(^.*_deploy_wildfly_.*)"
                  assignments:
                    - "dev1"
                  permissions:
                    - "Job/Build"
                    - "Job/Cancel"
                    - "Job/Discover"
                    - "Job/Read"
                    - "Job/Workspace"
                    - "View/Read"
                    - "Overall/Read" 

      results in a plugin error:

      May 31 10:32:13 jenkinsserver jenkins[23497]: Caused: io.jenkins.plugins.casc.ConfiguratorException: roleDefinition: Failed to construct instance of class org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition.
      May 31 10:32:13 jenkinsserver jenkins[23497]:  Constructor: public org.jenkinsci.plugins.rolestrategy.casc.RoleDefinition(java.lang.String,java.lang.String,java.lang.String,java.util.Collection,java.util.Collection).
      May 31 10:32:13 jenkinsserver jenkins[23497]:  Arguments: [java.lang.String, null, java.lang.String, java.util.ArrayList, java.util.ArrayList].
      May 31 10:32:13 jenkinsserver jenkins[23497]:  Expected Parameters: name java.lang.String, description java.lang.String, pattern java.lang.String, permissions java.util.Collection<java.lang.String>, assignments java.util.Collection<java.lang.String> 

            mawinter69 Markus Winter
            jzielke jzielke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: