Status: In Progress (View Workflow)
job-restrictions-plugin does not support Pipeline Plugin (aka Workflow plugin) and it's behavior is not as expected.
Steps to reproduce it:
Create a job using Pipeline Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin)
Create a slave in your master called for example 'demo-slave'.
In your Groovy script using pipeline do:
After in 'demo-slave' configuration, restrict it:
No matter if you start your job with 'daniel_hernandez' user or other user, the job will not get a executor from the demo-slave node getting the message:
Waiting for next available executor on demo-slave
After, You can release it setting the value to 'Take any job'
- is related to
JENKINS-36626 Support folder plugin with pipeline
Hmm ok, I will check into that. I was hoping to restrict this at the node level. I'm not entirely sure how to achieve this with that plugin, but maybe I missed something.
I don't really see a way to restrict nodes with Authorize Project. Any notes on that or a post that describes that?
I do not see the way how to do it in role-strategy as well. I need to restrict execution on certain Agents for certain people or groups and it is not possible to achieve it in standard authorisation method. In role-strategy I am able to not to allow build for certain group or people, but I want them to execute builds, but not on all agents
I have tried the version in attachment, job-restrictions.hpiand it works for my use case thanks mansoor, solving my problems (restrict execution only for certain groups). Build termination was not requested in this ticket, is there a vision of releasing this fix officially?
No update. The described use-case can be rather done by Authorize Project and user roles in matrix-auth/role-strategy