aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2022-06-05 17:05:31 +1000
committerOlivier Lamy <olamy@apache.org>2022-06-07 09:32:28 +1000
commitb79fb90f7a6d4dba0e24cbb1657345cd37a892d3 (patch)
tree98aeeba9cffeb95642c7a48380534c69b74349ba
parentd8fc065385beb40f93e1f61f6332f2660fc733f8 (diff)
downloadarchiva-b79fb90f7a6d4dba0e24cbb1657345cd37a892d3.tar.gz
archiva-b79fb90f7a6d4dba0e24cbb1657345cd37a892d3.zip
Add missing function
Signed-off-by: Olivier Lamy <olamy@apache.org>
-rw-r--r--Jenkinsfile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index caba878bf..8f71dac15 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -271,4 +271,28 @@ pipeline {
}
}
+// Send a notification about the build status
+def notifyBuild(String buildStatus) {
+ // default the value
+ buildStatus = buildStatus ?: "UNKNOWN"
+
+ def email = "notifications@archiva.apache.org"
+ def summary = "${env.JOB_NAME}#${env.BUILD_NUMBER} - ${buildStatus} - ${currentBuild?.currentResult}"
+ def detail = """<h4>Job: <a href='${env.JOB_URL}'>${env.JOB_NAME}</a> [#${env.BUILD_NUMBER}]</h4>
+ <p><b>${buildStatus}</b></p>
+ <table>
+ <tr><td>Build</td><td><a href='${env.BUILD_URL}'>${env.BUILD_URL}</a></td><tr>
+ <tr><td>Console</td><td><a href='${env.BUILD_URL}console'>${env.BUILD_URL}console</a></td><tr>
+ <tr><td>Test Report</td><td><a href='${env.BUILD_URL}testReport/'>${env.BUILD_URL}testReport/</a></td><tr>
+ </table>
+ """
+
+ emailext(
+ to: email,
+ subject: summary,
+ body: detail,
+ mimeType: 'text/html'
+ )
+}
+
// vim: et:ts=4:sw=4:ft=groovy