Hi,
I have two jobs A and B. Job A calls Job B like this
build job: "B", parameters[[$class: 'LabelParameterValue', name: 'node', label: "${env.NODE_NAME}"]]
I know I am supposed to add a Label parameter in B. But the problem is B is a multiple branch pipeline project defined by Jenkinsfile.
So the question is, how do I define a Label parameter in Jenkinsfile? I tried
parameters {
LabelParameterValue(name: 'node', label: '')
}
But I got the error:
WorkflowScript: 11: Invalid parameter type "Label". Valid parameter types: [booleanParam, choice, credentials, file, text, password, run, string] @ line 11, column 9.
Label(name: 'node', label: '')
^
Thanks for the help.