generated dsl options

478 views
Skip to first unread message

Matt Sheehan

unread,
Jul 9, 2016, 5:09:06 PM7/9/16
to job-dsl-plugin
I was updating some scripts to use the new generated DSL commands and ran into an issue. If I do this:
slackNotifier {
room 'deploys'
notifyFailure true
}
I get this exception:
javaposse.jobdsl.dsl.DslScriptException: (script, line 69) the following options are required and must be specified: teamDomain, authToken, buildServerUrl, sendAs, startNotification, notifyAborted, notifyNotBuilt, notifySuccess, notifyUnstable, notifyBackToNormal, notifyRepeatedFailure, includeTestSummary, commitInfoChoice, includeCustomMessage, customMessage

Is that right? Do all of the possible options need to be set now?


Daniel Spilker

unread,
Jul 10, 2016, 3:11:23 PM7/10/16
to job-dsl...@googlegroups.com
The Slack plugin uses a @DataBoundConstructor and all constructor parameters are mandatory.

https://github.com/jenkinsci/slack-plugin/blob/slack-2.0.1/src/main/java/jenkins/plugins/slack/SlackNotifier.java#L132

@DataBoundSetter should be used for optional parameters. Can you open a PR for the Slack plugin and move all optional parameters to @DataBoundSetters?

Daniel

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/CAKZH%3DdZPVrNyYMz%2BvT5QBJNuumqBZsStWUiAX2HDiEpXRwAtfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Matt Sheehan

unread,
Jul 14, 2016, 12:04:47 PM7/14/16
to job-dsl...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages