31 lines
1.1 KiB
Groovy
31 lines
1.1 KiB
Groovy
package eo;
|
|
|
|
|
|
def publish_cobertura_report(report_pattern) {
|
|
step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false,
|
|
coberturaReportFile: report_pattern, failUnhealthy: false, failUnstable: false,
|
|
maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])
|
|
}
|
|
|
|
|
|
def mail_notify(currentBuild, env, email) {
|
|
/* Send mail to 'email' if branch is master
|
|
else send mail to the author of last commit
|
|
*/
|
|
if (currentBuild.result == null) {
|
|
// Hack to have the 'jenkins build back to normal' mail sent
|
|
currentBuild.result = 'SUCCESS'
|
|
}
|
|
if (env.BRANCH_NAME == 'master') {
|
|
step([$class: 'Mailer', notifyEveryUnstableBuild: true,
|
|
recipients: email, sendToIndividuals: true])
|
|
} else {
|
|
step([$class: 'Mailer',
|
|
notifyEveryUnstableBuild: true,
|
|
recipients: emailextrecipients([[$class: 'CulpritsRecipientProvider'],
|
|
[$class: 'RequesterRecipientProvider']])])
|
|
}
|
|
}
|
|
|
|
return this
|