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.
[jenkins] add pipeline for hourly security solution cypress tests (el…
…astic#75087) (elastic#75109) * [jenkins] add pipeline for hourly security solution cypress tests * support customizing email for status emails * apply review feedback Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: spalger <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
096d65f
commit a697cd4
Showing
2 changed files
with
27 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/groovy | ||
|
||
library 'kibana-pipeline-library' | ||
kibanaLibrary.load() | ||
|
||
kibanaPipeline(timeoutMinutes: 180) { | ||
slackNotifications.onFailure( | ||
disabled: !params.NOTIFY_ON_FAILURE, | ||
channel: '#security-solution-slack-testing' | ||
) { | ||
catchError { | ||
workers.base(size: 's', ramDisk: false) { | ||
kibanaPipeline.bash('test/scripts/jenkins_security_solution_cypress.sh', 'Execute Security Solution Cypress Tests') | ||
} | ||
} | ||
} | ||
|
||
if (params.NOTIFY_ON_FAILURE) { | ||
kibanaPipeline.sendMail(to: '[email protected]') | ||
} | ||
} |
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 |
---|---|---|
|
@@ -203,7 +203,7 @@ def publishJunit() { | |
} | ||
} | ||
|
||
def sendMail() { | ||
def sendMail(Map params = [:]) { | ||
// 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' | ||
|
@@ -212,7 +212,7 @@ def sendMail() { | |
if (buildStatus != 'SUCCESS' && buildStatus != 'ABORTED') { | ||
node('flyweight') { | ||
sendInfraMail() | ||
sendKibanaMail() | ||
sendKibanaMail(params) | ||
} | ||
} | ||
} | ||
|
@@ -228,12 +228,14 @@ def sendInfraMail() { | |
} | ||
} | ||
|
||
def sendKibanaMail() { | ||
def sendKibanaMail(Map params = [:]) { | ||
def config = [to: '[email protected]'] + params | ||
|
||
catchErrors { | ||
def buildStatus = buildUtils.getBuildStatus() | ||
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED') { | ||
emailext( | ||
to: '[email protected]', | ||
config.to, | ||
subject: "${env.JOB_NAME} - Build # ${env.BUILD_NUMBER} - ${buildStatus}", | ||
body: '${SCRIPT,template="groovy-html.template"}', | ||
mimeType: 'text/html', | ||
|