Restrict on which node a scripted pipeline executes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Restrict on which node a scripted pipeline executes

F'nale
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?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/56b538ee-5466-425e-b8e2-0bfc7ef61afb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Restrict on which node a scripted pipeline executes

srivathsa.puliyala
You can use:

node ('Jenkins_slaveName'){
       <executions>
}

On Monday, April 9, 2018 at 4:52:57 AM UTC-4, F'nale wrote:
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?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0b487c1b-4bb5-4222-8c54-c8eb66c585a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.