In a Node.js app, one can use the slack-notify package to send something 
like this:


slack.send({
      "username": "myBotName",
      "icon_emoji": ":robot_face:",
      "mrkdwn": true,
      "attachments": [
         {
            "mrkdwn_in": ['text','pretext'],
            "color": "#199515",
            "text": message,
            "fallback": "*my*: _markdown_ message."
         }
      ]   
   });

In a Jenkinsfile, one can do this:
slackSend (
       color: '#F01717',
       message: "$JOB_NAME: <$BUILD_URL|Build #$BUILD_NUMBER>, my message."
)

I'm looking for a way to accomplish the Node implementation, but using 
slackSend so that the message dispatched from the Jenkinsfile will be 
on-par with the Node.js-sent message.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f9d4a4bf-5ced-47f1-a550-4eb4928e68eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to