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

The authorizationMatrix plugin doesent work with pipeline

XMLWordPrintable

      I'm trying to configure Project-based Matrix Authorization Strategy throw multibranch pipeline. 
      What i want to do - have different Project-based Matrix Authorization Strategy for each branch 
      But if I add some user to Matrix Authorization Strategy as "read" on multibranch projects's level then the user will have "read" permissions for all of branches which include in multibranch project Job.

      I tried to set  Matrix Authorization Strategy in Jenkinsfile for each branch but with different perrmissions for user.

      According changes https://wiki.jenkins.io/display/JENKINS/Matrix+Authorization+Strategy+Plugin:

      • Add support for use in the properties() pipeline step. For usage example, see the snippet generator. (JENKINS-34616)

      But when i added properties()  to my Jenkinsfile I got the error:
      WorkflowScript: 4: The 'properties' section has been renamed as of version 0.8. Use 'options' instead 

      Then I changed properties() to "options" and got the errror again:
      java.lang.NoSuchMethodError: No such DSL method 'permissions'

      I attached Jenkinsfile - just uncomment needed parameters

       

            danielbeck Daniel Beck
            serg_br Sergey Bralgin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: