[JIRA] (JENKINS-54556) The authorizationMatrix plugin doesent work with pipeline

2018-11-10 Thread bralg...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sergey Bralgin commented on  JENKINS-54556  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The authorizationMatrix plugin doesent work with pipeline
 

  
 
 
 
 

 
 Daniel Beck Andrew Bayer Guys, thank you a lot for your help. I found solution, I just misconfigured my Pipeline Job. Maybe it will be good example for another men. Working pipeline Jobs looks like (I just moved properties() parameter to "script  part"):   

 

pipeline { 
 agent none 
 stages { 
  stage('base matrix test') { 
  agent { node { label "jenkins-worker-ng" } } 
  steps { 
  script { 
 properties([authorizationMatrix(['hudson.model.Item.Build:Pupkin'])]) 
 sh "echo matrix works!!" 
  } 
  } 
  }  
  } 
} 

    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54556) The authorizationMatrix plugin doesent work with pipeline

2018-11-09 Thread bralg...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sergey Bralgin commented on  JENKINS-54556  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: The authorizationMatrix plugin doesent work with pipeline
 

  
 
 
 
 

 
 Andrew Bayer Thank you for answer. But I did it. I was trying to choose option from drop down and when I click to it - nothing happens. I mean "matrix auth" didnt add to  Declarative Directive Generator http://prntscr.com/lge2t8 Could you please provide code examples?    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54556) The authorizationMatrix plugin doesent work with pipeline

2018-11-09 Thread bralg...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sergey Bralgin created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-54556  
 
 
  The authorizationMatrix plugin doesent work with pipeline
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Daniel Beck  
 
 
Attachments: 
 Jenkinsfile  
 
 
Components: 
 matrix-auth-plugin  
 
 
Created: 
 2018-11-09 14:04  
 
 
Labels: 
 plugin pipeline matrix-auth  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Sergey Bralgin  
 

  
 
 
 
 

 
 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