Skip to content

Commit

Permalink
Move post actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnikaLau committed Sep 6, 2023
1 parent faf6c7b commit ad2f19e
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions testsuite/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,21 @@ pipeline {
}
post {
failure {
mail bcc: '',
body: "<b>Jenkins Failure</b><br>Project: ${env.JOB_NAME}<br>Build Number: ${env.BUILD_NUMBER}<br>Build URL: ${env.BUILD_URL}" ,
cc: "${EMAIL_TO_2}", charset: 'UTF-8', from: '', mimeType: 'text/html',
replyTo: '', subject: "Jenkins Job Failure ${NODE_NAME} -> ${env.JOB_NAME}",
to: "${EMAIL_TO_1}";
script {
TestBadge.setStatus('failing')
}
}
success {
mail bcc: '',
body: "<b>Jenkins Success</b><br>Project: ${env.JOB_NAME}<br>Build Number: ${env.BUILD_NUMBER}<br>Build URL: ${env.BUILD_URL}" ,
cc: "${EMAIL_TO_2}", charset: 'UTF-8', from: '', mimeType: 'text/html',
replyTo: '', subject: "Jenkins Job Success ${NODE_NAME} ->${env.JOB_NAME}",
to: "${EMAIL_TO_1}";
script {
TestBadge.setStatus('passing')
}
Expand All @@ -96,24 +106,6 @@ pipeline {
}
sh 'testsuite/test.sh'
}
post {
success {
mail bcc: '',
body: "<b>Jenkins Success</b><br>Project: ${env.JOB_NAME}<br>Build Number: ${env.BUILD_NUMBER}<br>Build URL: ${env.BUILD_URL}" ,
cc: "${EMAIL_TO_2}", charset: 'UTF-8', from: '', mimeType: 'text/html',
replyTo: '', subject: "Jenkins Job Success ${NODE_NAME} ->${env.JOB_NAME}",
to: "${EMAIL_TO_1}";
}
failure {
script {
mail bcc: '',
body: "<b>Jenkins Failure</b><br>Project: ${env.JOB_NAME}<br>Build Number: ${env.BUILD_NUMBER}<br>Build URL: ${env.BUILD_URL}" ,
cc: "${EMAIL_TO_2}", charset: 'UTF-8', from: '', mimeType: 'text/html',
replyTo: '', subject: "Jenkins Job Failure ${NODE_NAME} -> ${env.JOB_NAME}",
to: "${EMAIL_TO_1}";
}
}
}
}
}
}
Expand Down

0 comments on commit ad2f19e

Please sign in to comment.