jenkinsci / jenkinsci/release-plugin

[JENKINS-31159] Release post build steps for Matrix project cannot be set from UI

Open
#125 3 comments 0 reactions 0 assignees View on GitHub
component:release-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
24
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Assigning release build steps to After failed or successful release build and all matrix configurations is impossible from Jelly UI because of code duplication in src/main/resources/hudson/plugins/release/ReleaseWrapper/config.jelly 2.5.3:

Line 105

		    

"attach-previous">${%After failed or successful release build}
"postBuildSteps" hasHeader="true"
descriptors="${h2.getBuildSteps(it)}"
items="${instance.postBuildSteps}"
addCaption="${%Add release step}"/>

is duplicated at line 160:

		    

"attach-previous">${%After failed or successful release build and all matrix configurations}
"postBuildSteps" hasHeader="true"
descriptors="${h2.getBuildSteps(it)}"
items="${instance.postBuildSteps}"
addCaption="${%Add release step}"/>

whereas it should use postMatrixBuildSteps instead of postBuildSteps.

This results in the post build steps steps to be duplicated each time the page is saved.

The only workaround is NOT to rely on Jenkins Jelly UI to configure such job (XML editing / Jenkins API).

---
Originally reported by fchuong, imported from: Release post build steps for Matrix project cannot be set from UI


  • assignee: petehayes
  • status: Open
  • priority: Major
  • component(s): release-plugin
  • label(s): jelly, matrix, release-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251223-222157

Raw content of original issue

Assigning release build steps to After failed or successful release build and all matrix configurations is impossible from Jelly UI because of code duplication in src/main/resources/hudson/plugins/release/ReleaseWrapper/config.jelly 2.5.3:

Line 105



		    <!-- Post build steps -->

<label class="attach-previous">${%After failed or successful release build}</label>
<f:hetero-list name="postBuildSteps" hasHeader="true"
descriptors="${h2.getBuildSteps(it)}"
items="${instance.postBuildSteps}"
addCaption="${%Add release step}"/>

is duplicated at line 160:



		    <!-- Post build steps -->

<label class="attach-previous">${%After failed or successful release build and all matrix configurations}</label>
<f:hetero-list name="postBuildSteps" hasHeader="true"
descriptors="${h2.getBuildSteps(it)}"
items="${instance.postBuildSteps}"
addCaption="${%Add release step}"/>

whereas it should use postMatrixBuildSteps instead of postBuildSteps.

This results in the post build steps steps to be duplicated each time the page is saved.

The only workaround is NOT to rely on Jenkins Jelly UI to configure such job (XML editing / Jenkins API).

environment

```
Jenkins 1.619

release-plugin 2.5.3
```

Contributor guide

Open the contributing guide

Research direction

Start with src/main/resources/hudson/plugins/release/ReleaseWrapper/config.jelly, comparing the post-build-step blocks around lines 105 and 160. Confirm the matrix block uses postMatrixBuildSteps and verify that saving a matrix project through the Jelly UI no longer duplicates post-build steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.