No signature of method: error - slack notification

339 views
Skip to first unread message

ALVIN JAISON

unread,
Jan 5, 2017, 10:00:49 AM1/5/17
to job-dsl-plugin
Hello Friends,

I'm getting the following error while running seed job. 
++++++++++
ERROR: (beta_sync.groovy, line 37) No signature of method: buildServerUrl() is applicable for argument types: (java.lang.String) values: [http://jenkins.beta.mydomain.com/]
Possible solutions: teamDomain(), authToken(), room(), authTokenCredentialId(), sendAs(), startNotification(), notifyAborted(), notifyFailure(), notifyNotBuilt(), notifySuccess(), notifyUnstable(), notifyBackToNormal(), notifyRepeatedFailure(), includeTestSummary(), commitInfoChoice(), includeCustomMessage(), customMessage()
++++++++++

The problem started after updating jenkins and plugins to the latest. Please help me to figure out the problem

Thank you,
Alvin Jaison

Matt Sheehan

unread,
Jan 6, 2017, 9:25:41 AM1/6/17
to job-dsl-plugin
You probably updated the Slack plugin. I think the "buildServerUrl" method was removed at some point. Can you try without that line?

--
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/687fba5b-afb3-4eec-8b25-df3028402113%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike C.

unread,
Jan 31, 2017, 6:52:29 AM1/31/17
to job-dsl-plugin
I've faced the same issue and the dsl generated code does not seem to add the right config to the job config.xml.

For example, jenkins generated config (if i fiddle with the UI post-build action) generates this

```
   <publishers>
      <jenkins.plugins.slack.SlackNotifier plugin="slack@2.1">
        <teamDomain>team-name</teamDomain>
        <authToken></authToken>
        <authTokenCredentialId>auth-token</authTokenCredentialId>
        <room>#jenkins</room>
        <startNotification>true</startNotification>
        <notifySuccess>false</notifySuccess>
        <notifyAborted>false</notifyAborted>
        <notifyNotBuilt>false</notifyNotBuilt>
        <notifyUnstable>false</notifyUnstable>
        <notifyFailure>true</notifyFailure>
        <notifyBackToNormal>false</notifyBackToNormal>
        <notifyRepeatedFailure>false</notifyRepeatedFailure>
        <includeTestSummary>false</includeTestSummary>
        <commitInfoChoice>NONE</commitInfoChoice>
        <includeCustomMessage>false</includeCustomMessage>
        <customMessage></customMessage>
      </jenkins.plugins.slack.SlackNotifier>
    </publishers>
```

and the one from the dsl plugin

```
   <publishers>
        <jenkins.plugins.slack.SlackNotifier>
            <teamDomain>team</teamDomain>
            <authToken/>
            <authTokenCredentialId>auth-token</authTokenCredentialId>
            <room>#jenkins</room>
            <startNotification>true</startNotification>
            <notifySuccess>true</notifySuccess>
            <notifyAborted>false</notifyAborted>
            <notifyNotBuilt>false</notifyNotBuilt>
            <notifyUnstable>false</notifyUnstable>
            <notifyFailure>true</notifyFailure>
            <notifyBackToNormal>false</notifyBackToNormal>
            <notifyRepeatedFailure>false</notifyRepeatedFailure>
            <includeTestSummary>false</includeTestSummary>
            <commitInfoChoice>NONE</commitInfoChoice>
            <includeCustomMessage>false</includeCustomMessage>
            <customMessage/>
        </jenkins.plugins.slack.SlackNotifier>
    </publishers>
```

The first one works, the second one does not.
Reply all
Reply to author
Forward
0 new messages