Restricting Pipeline Job to run on specific slaves

2,024 views
Skip to first unread message

Kai

unread,
Jul 6, 2017, 8:19:37 AM7/6/17
to Jenkins Users
Hi,

I have created a pipeline job in Jenkins but I don't see a "Restrict where this project can be run" option.

Is there a way to restrict pipeline jobs to run on specific slaves?

Thanks

Richard Ginga

unread,
Jul 6, 2017, 8:26:49 AM7/6/17
to jenkins...@googlegroups.com
Where a pipeline runs is defined within the pipeline script using "node" blocks. the Jenkins master "runs" the pipeline.

--
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 jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/03d44fad-b6fe-4901-bb9a-b204b4c8aebe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Dick Ginga
Build Engineer

Björn Pedersen

unread,
Jul 6, 2017, 8:28:08 AM7/6/17
to Jenkins Users
Hi,

that option does not make much sense for a pipeline job. With each 'node() ' you can specify a label or slave where this part of the pipeline should run. The main part (that does typically nothing that is computationally demanding) then runs on the master (in a fylweight executor actually).

See [1] as well.

Björn

[1]  https://groups.google.com/forum/#!topic/jenkinsci-users/FRfL4RHAYnk

Kai

unread,
Jul 6, 2017, 8:40:08 AM7/6/17
to Jenkins Users
Thank you both.

Now I see that I can do something like this:

agent { label 'slaves' }

On Thursday, July 6, 2017 at 5:26:49 AM UTC-7, Richard Ginga wrote:
Where a pipeline runs is defined within the pipeline script using "node" blocks. the Jenkins master "runs" the pipeline.
On Thu, Jul 6, 2017 at 8:19 AM, Kai <kaite...@gmail.com> wrote:
Hi,

I have created a pipeline job in Jenkins but I don't see a "Restrict where this project can be run" option.

Is there a way to restrict pipeline jobs to run on specific slaves?

Thanks

--
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 jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages