Reputation: 67
Can I use slackSend command in jenkins flow dsl if i have Jenkins ver. 1.656. I have enabled Slack Notification Plugin and it works fine in most cases, but i wish to display message when build starts.
Upvotes: 1
Views: 979
Reputation: 1458
You can set up script in the pipeline, should be something like this:
def notify(status) {
slackSend channel: "#jenkins",
color: '#d71f85',
message: "${status}",
tokenCredentialId: 'yourtoken'
}
pipeline{
....
stages{
stage('Buildstart) {
steps {
notify("Build Started")
}
}
....
}
}
Upvotes: 1