forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a few issues related to sending emails in pipeline (elastic#45470)
- Loading branch information
1 parent
f8f95bb
commit a17e44d
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,10 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a | |
]) | ||
} | ||
node('flyweight') { | ||
// If the build doesn't have a result set by this point, there haven't been any errors and it can be marked as a success | ||
// The e-mail plugin for the infra e-mail depends upon this being set | ||
currentBuild.result = currentBuild.result ?: 'SUCCESS' | ||
|
||
sendMail() | ||
} | ||
} | ||
|
@@ -240,9 +244,8 @@ def sendKibanaMail() { | |
catchError { | ||
if(params.NOTIFY_ON_FAILURE && currentBuild.result != 'SUCCESS' && currentBuild.result != 'ABORTED') { | ||
emailext( | ||
// to: '[email protected]', | ||
to: '[email protected]', // TODO switch this out after testing | ||
subject: "${env.PROJECT_NAME} - Build # ${env.BUILD_NUMBER} - ${currentBuild.result}", | ||
to: '[email protected]', | ||
subject: "${env.JOB_NAME} - Build # ${env.BUILD_NUMBER} - ${currentBuild.result}", | ||
body: '${SCRIPT,template="groovy-html.template"}', | ||
mimeType: 'text/html', | ||
) | ||
|