Skip to content

Commit

Permalink
JENKINS-32635: Fix load/save ignoreUnsuccessfulUpstreams parameter (#78)
Browse files Browse the repository at this point in the history
ignoreUnsuccessfulUpstreams parameter should be captured within triggerByDependency
configuration in the form JSON
  • Loading branch information
azherebtsov authored and aheritier committed Sep 2, 2016
1 parent 3038b55 commit c10cfb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/main/java/hudson/maven/MavenModuleSet.java
Expand Up @@ -1220,7 +1220,12 @@ protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOExceptio
else
localRepository = null;
ignoreUpstremChanges = !json.has("triggerByDependency");
ignoreUnsuccessfulUpstreams = json.has("ignoreUnsuccessfulUpstreams");
if ( !ignoreUpstremChanges ) {
JSONObject ignoreUpstremChangesConfig = json.optJSONObject("triggerByDependency");
ignoreUnsuccessfulUpstreams = null != ignoreUpstremChangesConfig && ignoreUpstremChangesConfig.has("ignoreUnsuccessfulUpstreams");
} else {
ignoreUnsuccessfulUpstreams = false;
}
runHeadless = req.hasParameter("maven.runHeadless");
incrementalBuild = req.hasParameter("maven.incrementalBuild");
archivingDisabled = req.hasParameter("maven.archivingDisabled");
Expand Down
Expand Up @@ -40,7 +40,7 @@ THE SOFTWARE.
<f:optionalBlock name="maven.ignoreUnsuccessfulUpstreams"
title="${%Schedule build when some upstream has no successful builds}"
help="/plugin/maven-plugin/ignore-unsuccessful-upstreams.html"
checked="${h.defaultToFalse(it.ignoreUnsuccessfulUpstreams())}"/>
checked="${it.ignoreUnsuccessfulUpstreams()}"/>
</table>
</f:nested>
</f:optionalBlock>
Expand Down

0 comments on commit c10cfb4

Please sign in to comment.