I'm setting up a Jenkins pipeline wherein I want to send post build notification to more than one receipents. i'm not able to find how to set "CC", Can someone help.
An example of my pipeline is as under:
pipeline {
agent any
stages {
stage('No-op') {
steps {
sh 'ls'
}
}
}
post {
failure {
mail to: '[email protected]',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}
The above example is working fine for me, but i want to modify the following line to send notification to multiple people (preferably in CC):
mail to: '[email protected]',
I'm using Jenkins ver. 2.41
I don't know if you can CC them, but to send to multiple recipients try using a comma-delimited list:
mail to: '[email protected],[email protected]',
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With