-
Bug
-
Resolution: Fixed
-
Major
-
Linux master, Solaris slave
I have a parameterized job, which specifies a Label parameter from the NodeLabel plugin, calling it JK_PLATFORM.
This JK_PLATFORM parameter is available in the environment doing the build. But when I want to do a "archive the artifacts" in as post build action and use ${JK_PLATFORM} as part of the "files to archive" like
${JK_SVN_BRANCH}/${JK_PLATFORM}/${JK_RELEASE}/cdrom/*
I get the following error:
—
Archiving artifacts
ERROR: No artifacts found that match the file pattern "trunk/${JK_PLATFORM}/false/cdrom/*". Configuration error?
—
Looks like the JK_PLATFORM parameter is not resolved.
I think the problem is that the node label parameters do not implement the buildEnvVars() [1] method of ParameterValue so they are not added to the environment correctly, but only when createBuildWrapper() is called.
If this is added then the parameter would be resolved as the parameter would be present in the env.
[1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ParameterValue.java#L130