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!