Skip to content

Commit

Permalink
[JENKINS-36544] Fix Node Properties on Jenkins 2.205+
Browse files Browse the repository at this point in the history
This is a follow-up fix for PR jenkinsci#382.

In 2.204, the "Configure Clouds" screen was on the main /configure system
configuration page. As a result, `${it}` referred to the global system
object, aka the Hudson instance.

In 2.205, PR jenkinsci/jenkins#4339 merged, which moves the Configure Clouds
section to a new page: /configureClouds. As a result of that change, `${it}`
no longer refers to the Hudson instance, but to a new
GlobalCloudConfiguration object. That object does not have the
`getNodePropertyDescriptors()` method, so it is not able to populate the
"Node Properties" block.

Switching that to `${app}` gives it a correct reference to the Hudson object,
and that allows it to show the Node Properties block on all Jenkins versions,
both before and after v2.205.
  • Loading branch information
jhansche committed Mar 9, 2020
1 parent c2f4b5c commit c361e0d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ THE SOFTWARE.
<f:textbox default="-1"/>
</f:entry>

<f:descriptorList title="${%Node Properties}" field="nodeProperties" descriptors="${it.getNodePropertyDescriptors()}" />
<f:descriptorList title="${%Node Properties}" field="nodeProperties" descriptors="${app.getNodePropertyDescriptors()}" />

</f:advanced>

Expand Down

0 comments on commit c361e0d

Please sign in to comment.