I got 2 pipeline jobs.
Jenkinsfile in the first one:
slave_list = ['test01', 'test02']
build job: 'pipeline-test2', parameters: [[$class: 'NodeParameterValue',
name: 'node_list', labels: slave_list, nodeEligibility: [$class:
'AllNodeEligibility']]]
Jenkinsfile in the second one,and job name is "pipeline-test2":
echo node_list
for (slave in node_list) {
echo slave
}
the first job triggers the second one, and the output of the second job is:
[Pipeline] echo
test01
[Pipeline] echo
t
[Pipeline] echo
e
[Pipeline] echo
s
[Pipeline] echo
t
[Pipeline] echo
0
[Pipeline] echo
1
why the second job receives only one parameter:test01? I want the second
job to receive a list(slave_list) from the first one? and how to complete
it? 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/202890cc-20d5-4626-8b89-e42e2d9b3739%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.