-
Bug
-
Resolution: Fixed
-
Major
-
JDK Parameter 1.1
Jenkins 2.375.1
-
-
1.2
After upgrading to 1.1, this piece of pipeline code:
build job: "some_job", propagate: false, parameters: [
string(name: 'milestone', value: buildingMilestone),
string(name: 'mavenExtras', value: toBuild.mavenExtras),
string(name: 'branch', value: thisBranch),
[$class: 'NodeParameterValue', name: 'buildLabel', labels: [toBuild.label], nodeEligibility: [$class: 'AllNodeEligibility']],
[$class: 'JavaParameterValue', name: 'jdkVersion', selectedJDK: jdkVersion],
booleanParam(name: 'cleanWorkspace', value: toBuild.cleanWorkspace)
]
Issues this warning, and then "some job" doesn't get the right version of the JDK.
WARNING: Unknown parameter(s) found for class type 'com.datalex.jdkparameter.JavaParameterValue': selectedJDKScheduling project: EventProcessing » parent.java11.linuxThe parameter 'jdkVersion' did not have the type expected by EventProcessing » parent.java11.linux. Converting to JDK Parameter.
It looks like the selectedJDK parameter disappeared from 1.1 on purpose. It's a breaking change - how do we get the code above to get the right JDK version passed into the job we are trying to build?
Here's one place where it used to be:
The commit that removed the capability was merged to the plugin repository in 2015 with no intervening release that included that commit until the December 2022 release of JDK parameter plugin 1.1.
No users of the released plugin could have relied on the feature added in 2015 (2a71621a9f9f52b5f4dfc9e018fd1de3b996f7b) because it was not available in a release until December 2022.
I've created a pull request that proposes to create a 1.2 release that removes two enhancements so that the plugin only has the 1.0 release functionality. Could you install the pre-release build and report your results?