You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2022/06/05 07:05:50 UTC
[archiva] branch master-jenkinsfile-it-test updated: Add missing function
This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch master-jenkinsfile-it-test
in repository https://gitbox.apache.org/repos/asf/archiva.git
The following commit(s) were added to refs/heads/master-jenkinsfile-it-test by this push:
new b11edf305 Add missing function
b11edf305 is described below
commit b11edf305bfee0749e1524abd78372b801b3eb23
Author: Olivier Lamy <ol...@apache.org>
AuthorDate: Sun Jun 5 17:05:31 2022 +1000
Add missing function
Signed-off-by: Olivier Lamy <ol...@apache.org>
---
Jenkinsfile | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index 495a75d71..b9905a7c9 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