Restrict on which node a scripted pipeline executes

26 views
Skip to first unread message

F'nale

unread,
Apr 9, 2018, 4:52:57 AM4/9/18
to Jenkins Users
Hi All,
I have a pipeline that schedules various jobs. Each job runs on a specific node.
The problem occurs after the pipeline has been started and the first job was scheduled. The pipeline takes the node on which the first job needs to execute. I end up with a loop where the first job is waiting for its node, on which the pipeline is executing while the pipeline waits for the first job to execute.
My pipeline is scripted. I need a way to restrict it to one node.
Help?

srivathsa...@gmail.com

unread,
Apr 14, 2018, 8:32:56 AM4/14/18
to Jenkins Users
You can use:

node ('Jenkins_slaveName'){
       <executions>
Reply all
Reply to author
Forward
0 new messages