AndyB <andy.bigos <at> gmail.com> writes:

> 
> 
> 
> Hi,
> 
> Could you tell me if it's possible to tie a matrix job (and it's elements)
to use a specific range of nodes (by node name or label)? 
> 
> The use case is to manage pools of resources, so for example, if you had
two pools of nodes, P1 and P2, some jobs could be restricted to run on nodes
in P1, others on nodes in P2, and others could run on P1 or P2 (no restriction).
> 
> There are two reasons I'd like to do this, first because I'm using a tool
that is licensed for a subset of the total number of slaves available, so
I'd like to be able to restrict some jobs to run on only those nodes while
other jobs can run on all nodes. The other use case is to create resource
pools that could be shared between projects, e.g. project A can use P1,
project B can use P2, project A or B can use P3 (a shared resource). 
> 
> Thanks,
> Andy
> 
> 
> 
> 

Hi Andy,
You just have to use label to do this. First install NodeLabel Parameter
Plugin. You must also configure each node with label P1 or P2 or whatever.
Then, if you want a job to run on P1, you use "This build is parameterized"
in configuration page, with Label as parameter type (value P1).
If you want a job to run on P2, you use "This build is parameterized" with
Label as parameter type (value P2).
At last, if you want a job to run on P1 and P2, you don't specify any label
parameter.

Regards,
Robert




-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to