feat(jenkins): new notifications and reports to Elasticsearch
@@ -202,21 +202,13 @@ pipeline {
def processor = new ResultsProcessor()
processor.processResults(mapResults)
archiveArtifacts allowEmptyArchive: true, artifacts: 'results.json,results.html', defaultExcludes: false
+ catchError(){
+ def datafile = readFile(file: "results.json")
+ sendDataToElasticsearch(data: datafile, restCall: '/jenkins-builds-test-results/_doc/')
}
}
}
- success {
- echoColor(text: '[SUCCESS]', colorfg: 'green', colorbg: 'default')
- }
- aborted {
- echoColor(text: '[ABORTED]', colorfg: 'magenta', colorbg: 'default')
- }
- failure {
- echoColor(text: '[FAILURE]', colorfg: 'red', colorbg: 'default')
- step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${NOTIFY_TO}", sendToIndividuals: false])
- }
- unstable {
- echoColor(text: '[UNSTABLE]', colorfg: 'yellow', colorbg: 'default')
+ notifyBuildResult()
}
}
}
