Regex on jenkins label expression

1,406 views
Skip to first unread message

Mona Pinjani

unread,
Aug 4, 2016, 2:27:45 PM8/4/16
to Jenkins Users
In job configuration, there is a checkbox "Restrict where this project can be run". If you select it, there is an input field about Label Expression.
Is there a way to insert of regex there, and not the exact name? I need to build a job on more than one docker image. I tried many combinations (puppet-enterprise-3.8.2 && puppet-enterprise-4.3.2 ) but not able to build on multiple labels.

If yes, could you provide an example of this?
Jenkins ver 2.15

Thanks!

Baptiste Mathus

unread,
Aug 5, 2016, 2:40:31 AM8/5/16
to jenkins...@googlegroups.com

Even if it could, this wouldn't do what you think. This field is to be read as "here's the requirement to find *one* node that would match". That would not start a build on all the matching nodes.

For doing this, there're two typical ways:
* Matrix project, where you define those axes then all combinations are run
* Pipeline, using the parallel step (or serial, you choose), you need to create the data and make those parallel calls.


--
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/192cdf2a-ff3f-4c60-a590-0d7c7d008c51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Beck

unread,
Aug 5, 2016, 8:17:51 AM8/5/16
to jenkins...@googlegroups.com
https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin

Also supports starting multiple builds on different nodes I think.

> On 05.08.2016, at 08:40, Baptiste Mathus <m...@batmat.net> wrote:
>
> Even if it could, this wouldn't do what you think. This field is to be read as "here's the requirement to find *one* node that would match". That would not start a build on all the matching nodes.
>
> For doing this, there're two typical ways:
> * Matrix project, where you define those axes then all combinations are run
> * Pipeline, using the parallel step (or serial, you choose), you need to create the data and make those parallel calls.
>
>
> Le 4 août 2016 8:27 PM, "Mona Pinjani" <mona.p...@gmail.com> a écrit :
> In job configuration, there is a checkbox "Restrict where this project can be run". If you select it, there is an input field about Label Expression.
> Is there a way to insert of regex there, and not the exact name? I need to build a job on more than one docker image. I tried many combinations (puppet-enterprise-3.8.2 && puppet-enterprise-4.3.2 ) but not able to build on multiple labels.
>
> If yes, could you provide an example of this?
> Jenkins ver 2.15
>
> 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.
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5zDU51EpyO6OzVBzxckJ0wyuUKeDyfdHVpC7_jPdgzxA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages