Hi there
I'm running Jenkins version 1.565.2
I'm having a strange problem when dynamically triggering downstream projects
I have created a job 'Sports - Core - Scheduled' which accepts 2
parameters.
One - called 'Stream' which is for our stream(Source Control stream). This
is a choice parameter
Two - called 'Product' which is for our products(that we build in our
company). This is a Label parameter having 10 nodes(servers) associated to
it.
When i build this job manually, Jenkins recognises the Label parameter and
automatically picks one of the free node from the label and everything
works fine.
We have about 300 of these sort of jobs for various streams/products
scenarios for which i'm writing a Groovy script which calls all these jobs
to run dynamically but the following script below is failing to recognise
the label parameter and actually assigning someother node which is not even
associated with the 'product' label.
Any idea what i'm doing wrong or what do i need to do to ensure i can pass
a label parameter successfully to the script below.
I'm a newbie but i can provide more details if need be.
import hudson.model.*;
import jenkins.model.*;
import jenkins.*;
// Core Test run
job = Hudson.instance.getJob('Sports - Core - Scheduled');
timer =60
time=1;
WholeParams = [
["Core-Test","Sports"]
]
for (i in WholeParams)
{
params = []
params += new hudson.model.StringParameterValue('Stream', i[0])
params += new hudson.model.StringParameterValue('Product', i[1])
paramsAction = new hudson.model.ParametersAction(params)
cause = new hudson.model.Cause.UpstreamCause(manager.build)
causeAction = new hudson.model.CauseAction(cause)
manager.hudson.queue.schedule(job,time, causeAction, paramsAction);
time=time+timer;
}
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/d49ea5b7-0893-4801-b696-5b92be028a28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.