-
Task
-
Resolution: Fixed
-
Minor
-
None
Since version 2.0, the Mattermost Plugin no longer has a field showCommitList.
This leads to Jenkins finding "unreadable data":
MissingFieldException: No field 'showCommitList' found in class 'jenkins.plugins.mattermost.MattermostNotifier'
Instead, there's now a field commitInfoChoice, which is an enum with (currently) three possible values NONE, AUTHORS, or AUTHORS_AND_TITLES.
I've also looked at the new generic DSL version, but going from
mattermost { endpoint(MATTERMOST_HOOK_URL) notifyFailure() }
to
mattermostNotifier { endpoint(MATTERMOST_HOOK_URL) room(null) icon(null) buildServerUrl(null) sendAs(null) startNotification(false) notifyAborted(false) notifyFailure(true) notifyNotBuilt(false) notifySuccess(false) notifyUnstable(false) notifyBackToNormal(false) notifyRepeatedFailure(false) includeTestSummary(false) commitInfoChoice('NONE') includeCustomMessage(false) customMessage(null) }
is not exactly an attractive proposition (undocumented, no IDE support, can't leave out default valued fields, very little advantage over a configure block).
[JENKINS-39239] Mattermost Plugin 2.0+: No field 'showCommitList'
Component/s | New: mattermost-plugin [ 21021 ] |
Assignee | Original: Daniel Spilker [ daspilker ] | New: Jo Vandeginste [ jovandeginste ] |
I redirect this to the Mattermost plugin.
A plugin must not remove a field to retain backwards compatibility, see https://wiki.jenkins-ci.org/display/JENKINS/Hint+on+retaining+backward+compatibility.
And the automatically generated DSL does require all options because the Mattermost plugin marks the options as mandatory by using a @DataBoundConstructor instead of @DataBoundSetter. This also affects the Pipeline DSL, see https://github.com/jenkinsci/pipeline-plugin/blob/master/DEVGUIDE.md#constructor-vs-setters.