[JIRA] (JENKINS-55015) Include Custom Message has stopped work with DSL

3 views
Skip to first unread message

wypychemil@gmail.com (JIRA)

unread,
Dec 4, 2018, 10:28:01 AM12/4/18
to jenkinsc...@googlegroups.com
Emil Wypych created an issue
 
Jenkins / Bug JENKINS-55015
Include Custom Message has stopped work with DSL
Issue Type: Bug Bug
Assignee: Kurt Madel
Attachments: image-2018-12-04-16-04-41-040.png, image-2018-12-04-16-04-52-858.png
Components: slack-plugin
Created: 2018-12-04 15:27
Environment: Jenkins 2.153
Slack Plugin 2.4
Job DSL 1.70
Priority: Minor Minor
Reporter: Emil Wypych

We use Jenkins DSL to manage our jobs configuration. Some of the jobs have Slack Plugin configured with the custom message. It stopped work with the Slack Plugin 2.4 - includeCustomMessage property doesn't do anything at all.

 

Take a look at this DSL configuration:

 

def userMessage = "@emil"job("slack-try"){
  publishers {
    slackNotifier {
            authToken('')
            baseUrl('')
            botUser(false)
            commitInfoChoice('NONE')
            includeCustomMessage(true)
            includeTestSummary(false)
            notifyAborted(false)
            notifyBackToNormal(true)
            customMessage(userMessage)
            notifyFailure(true)
            notifyNotBuilt(false)
            notifyRegression(false)
            notifyRepeatedFailure(true)
            notifySuccess(false)
            notifyUnstable(false)
            room('')
            tokenCredentialId('')
            sendAs('')
            startNotification(false)
            teamDomain('')
    }
  }
}

It should generate a job with Slack Notifier and WITH Custom Message checked. And in the created XML file includeCustomMessage is set to true:

 

 

<?xml version="1.0" encoding="UTF-8"?><project>
    <actions/>
    <description/>
    <keepDependencies>false</keepDependencies>
    <properties/>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders/>
    <publishers>
        <jenkins.plugins.slack.SlackNotifier plugin="slack@2.4">
            <baseUrl/>
            <teamDomain/>
            <authToken/>
            <tokenCredentialId/>
            <botUser>false</botUser>
            <room/>
            <sendAs/>
            <startNotification>false</startNotification>
            <notifySuccess>false</notifySuccess>
            <notifyAborted>false</notifyAborted>
            <notifyNotBuilt>false</notifyNotBuilt>
            <notifyUnstable>false</notifyUnstable>
            <notifyRegression>false</notifyRegression>
            <notifyFailure>true</notifyFailure>
            <notifyBackToNormal>true</notifyBackToNormal>
            <notifyRepeatedFailure>true</notifyRepeatedFailure>
            <includeTestSummary>false</includeTestSummary>
            <includeFailedTests>false</includeFailedTests>
            <commitInfoChoice>NONE</commitInfoChoice>
            <includeCustomMessage>true</includeCustomMessage>
            <customMessage>@emil</customMessage>
        </jenkins.plugins.slack.SlackNotifier>
    </publishers>
    <buildWrappers/>
</project>

 

But in the GUI Include Custom Message checkbox is not marked:

This functionality works perfectly with Slack Plugin 2.3. For us, it's very annoying, so we decided to downgrade the plugin, and rollback configuration (in 2.4 there are new properties like baseUrl or tokenCredentialId).

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

marcis.liepins.1993@gmail.com (JIRA)

unread,
Dec 6, 2018, 4:57:03 AM12/6/18
to jenkinsc...@googlegroups.com
Marcis Liepins commented on Bug JENKINS-55015
 
Re: Include Custom Message has stopped work with DSL

Seeing the same problem using Freestyle projects, but I do not have Job DSL plugin installed.


Environment: 
Jenkins 2.153 
Slack Plugin 2.4

wypychemil@gmail.com (JIRA)

unread,
Dec 11, 2018, 10:34:02 AM12/11/18
to jenkinsc...@googlegroups.com

Seems it has been fixed in 2.6 – Marcis Liepins could you please confirm?

marcis.liepins.1993@gmail.com (JIRA)

unread,
Dec 15, 2018, 7:40:02 PM12/15/18
to jenkinsc...@googlegroups.com

Emil Wypych Slack Plugin 2.6 working on Jenkins 2.155

marcis.liepins.1993@gmail.com (JIRA)

unread,
Dec 15, 2018, 7:41:03 PM12/15/18
to jenkinsc...@googlegroups.com
Marcis Liepins edited a comment on Bug JENKINS-55015
[~ewypych] Slack Plugin 2.6 working on Jenkins 2.155 (y)

timjacomb1@gmail.com (JIRA)

unread,
Dec 1, 2019, 2:16:03 PM12/1/19
to jenkinsc...@googlegroups.com
Change By: Tim Jacomb
Status: Open Fixed but Unreleased
Resolution: Fixed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

timjacomb1@gmail.com (JIRA)

unread,
Dec 1, 2019, 2:16:04 PM12/1/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages