Matrix building and triggered builds on nodes with teh same OS

19 views
Skip to first unread message

Bob Stafford

unread,
Jun 18, 2015, 5:50:21 PM6/18/15
to jenkins...@googlegroups.com
Hi All,

I'm new to Jenkins so I apologize if this is a simple question but I've been stuck on this issue for a few days and all the googling and experimenting has not got me to an answer.

I have a matrix configuration to clone and compile my application on Suse 12.2, Suse 13.2 and Centos 6 using nodes running on these OSes, that part works fine.

Once my compilation is complete I then want to trigger tests builds that can run in parallel on multiple nodes it is however important that code built on Suse 12.2 for example is only tested on slaves running 12.2 and I've not yet found a way to limit my triggered builds to run only on the nodes with the same OS (but not necessarily the same node as  the compilation). Currently Jenkins will happily try to run my Suse 12.2 code on Centos. I've managed to export the label value to my triggered builds but that does not limit them to running on the same OS as the build that triggered them.

I hope I've got my Jenkins terminology right the use of the word build to mean compile or test or anything else is a little foreign to me.

All help much appreciated.

Bob S.

Eric Pyle

unread,
Jun 19, 2015, 9:59:43 AM6/19/15
to jenkins...@googlegroups.com
Hi Bob,

You should be able to configure the triggered builds to use a particular label, using the NodeLabel Parameter Plugin, which lets you pass a parameter indicating a label the job should run on.

Regards,
Eric
--
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/e4787ec2-aeb9-47c6-9878-e7c1317b25c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bob Stafford

unread,
Jun 19, 2015, 1:47:32 PM6/19/15
to jenkins...@googlegroups.com
Hi Eric,

Thanks for the suggestion but I've not yet managed to make it work. From my matrix job when the compilation build  has finished from Suse13.2 I want to run the test build on the suse 13.2 nodes  and when the Centos compilation has finished I want to run the same test on the centos nodes.

With the NodeLabel plugin  I can specify a constant OS (e.g. Suse 13.2) but I've not managed to make it dynamic, so if I specify ${OS} as the label and the matrix job exports the variable OS set to the appropriate either Suse13.2 or Centos it just fails.

Am I missing something?

Regards,

Bob S.

Eric Pyle

unread,
Jun 19, 2015, 1:56:22 PM6/19/15
to jenkins...@googlegroups.com
Bob,

You would need to pass the value "Suse13.2" (or whatever OS label) as the Label parameter to the downstream job. So in the downstream job you define a parameter of type Label, and then you pass the desired label value as that parameter when invoking the downstream job. Do you have the Parameterized Trigger plugin? You would need that to be able to pass parameters to a downstream job.

I was going to try this but I'm having problems with Chrome right now and it won't let me configure a new job.

Eric
Reply all
Reply to author
Forward
0 new messages