mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-02 00:45:30 +08:00
add email notify function
Former-commit-id: b5813c2a1916b72aa23f2026d95fd1023d5406a7
This commit is contained in:
parent
b7966df1f1
commit
72ffedebd7
15
ci/jenkinsfile/notify.groovy
Normal file
15
ci/jenkinsfile/notify.groovy
Normal file
@ -0,0 +1,15 @@
|
||||
def notify() {
|
||||
if (!currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
|
||||
// Send an email only if the build status has changed from green/unstable to red
|
||||
emailext subject: '$DEFAULT_SUBJECT',
|
||||
body: '$DEFAULT_CONTENT',
|
||||
recipientProviders: [
|
||||
[$class: 'DevelopersRecipientProvider'],
|
||||
[$class: 'RequesterRecipientProvider']
|
||||
],
|
||||
replyTo: '$DEFAULT_REPLYTO',
|
||||
to: '$DEFAULT_RECIPIENTS'
|
||||
}
|
||||
}
|
||||
return this
|
||||
|
||||
@ -232,6 +232,12 @@ spec:
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
def notify = load "${env.WORKSPACE}/ci/jenkinsfile/notify.groovy"
|
||||
notify.notify()
|
||||
}
|
||||
}
|
||||
success {
|
||||
script {
|
||||
updateGitlabCommitStatus name: 'CI/CD', state: 'success'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user