mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
send email on master node
Former-commit-id: 33fe31f8254b5ab2cc7a99e4b903a16730030f71
This commit is contained in:
parent
fe085bc56d
commit
2e59ea0d32
@ -234,12 +234,20 @@ spec:
|
|||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
node {
|
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
|
||||||
def notify = load "${env.WORKSPACE}/ci/jenkinsfile/notify.groovy"
|
// Send an email only if the build status has changed from green/unstable to red
|
||||||
notify.notify()
|
emailext subject: '$DEFAULT_SUBJECT',
|
||||||
|
body: '$DEFAULT_CONTENT',
|
||||||
|
recipientProviders: [
|
||||||
|
[$class: 'DevelopersRecipientProvider'],
|
||||||
|
[$class: 'RequesterRecipientProvider']
|
||||||
|
],
|
||||||
|
replyTo: '$DEFAULT_REPLYTO',
|
||||||
|
to: '$DEFAULT_RECIPIENTS'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
success {
|
success {
|
||||||
script {
|
script {
|
||||||
updateGitlabCommitStatus name: 'CI/CD', state: 'success'
|
updateGitlabCommitStatus name: 'CI/CD', state: 'success'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user