pipeline { stages { ... } post { // only triggered when blue or green sign success { slackSend(channel: 'alerts-testing', color: 'good', message: ":party_parrot: NOTIFICATION: NEW RELEASE ${newRelease} WILL BE CREATED AUTOMATICALLY :party_parrot:") } // triggered when red sign failure { slackSend(channel: 'alerts-testing', color: 'RED', message: ":alarm_clock: NOTIFICATION: NEW RELEASE ${newRelease} WITH SOME FAILURE :alarm_clock:") } // trigger every-works always { slackSend ... } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter