-
Bug
-
Resolution: Fixed
-
Minor
-
Jenkins 2.32.3
Stash notifier plugin- 1.11.6
job-dsl plugin - 1.52
When following the job dsl documentation for the Stash notifier plugin (https://jenkinsci.github.io/job-dsl-plugin/#path/job-publishers-stashNotifier)
code:
job('blah') { publishers { stashNotifier() } }
It produces the following XML:
<org.jenkinsci.plugins.stashNotifier.StashNotifier>
<stashServerBaseUrl/>
<stashUserName/>
<stashUserPassword/>
<ignoreUnverifiedSSLPeer>false</ignoreUnverifiedSSLPeer>
<commitSha1/>
<includeBuildNumberInKey>false</includeBuildNumberInKey>
</org.jenkinsci.plugins.stashNotifier.StashNotifier>
This triggers an "Unreadable Data" message:
MissingFieldException: No field 'stashUserName' found in class 'org.jenkinsci.plugins.stashNotifier.StashNotifier', MissingFieldException: No field 'stashUserPassword' found in class 'org.jenkinsci.plugins.stashNotifier.StashNotifier'
Same issue just occured to me. I think because of changes in StashNotifier plugin (https://github.com/jenkinsci/stashnotifier-plugin)
stashServerBaseUrl, stashUserName, stashUserPassword and ignoreUnverifiedSSLPeer are obsolete for job configuration in DSL.
In my opinion this must be fixed in Job-DSL-Plugin (https://github.com/jenkinsci/job-dsl-plugin)
See: https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy#L1028
and perhaps also: https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy
As for a temporary workarround you can define your DSL code with a configure block: