Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into 652-nightly-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya authored Jan 29, 2021
2 parents b81ab1c + d4abef1 commit 2f3d6c2
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pipeline {
string(name: 'runTestsSuites', defaultValue: '', description: 'A comma-separated list of test suites to run (default: empty to run all test suites)')
booleanParam(name: "forceSkipGitChecks", defaultValue: false, description: "If it's needed to check for Git changes to filter by modified sources")
booleanParam(name: "forceSkipPresubmit", defaultValue: false, description: "If it's needed to execute the pre-submit tests: unit and precommit.")
booleanParam(name: "notifyOnGreenBuilds", defaultValue: false, description: "If it's needed to notify with green builds.")
booleanParam(name: "notifyOnGreenBuilds", defaultValue: false, description: "If it's needed to notify to Slack with green builds.")
string(name: 'SLACK_CHANNEL', defaultValue: 'observablt-bots', description: 'The Slack channel(s) where errors will be posted. For multiple channels, use a comma-separated list of channels')
string(name: 'ELASTIC_AGENT_DOWNLOAD_URL', defaultValue: '', description: 'If present, it will override the download URL for the Elastic agent artifact. (I.e. https://snapshots.elastic.co/8.0.0-59098054/downloads/beats/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz')
string(name: 'ELASTIC_AGENT_VERSION', defaultValue: '8.0.0-SNAPSHOT', description: 'SemVer version of the stand-alone elastic-agent to be used for Fleet tests. You can use here the tag of your PR to test your changes')
Expand Down Expand Up @@ -238,18 +238,7 @@ pipeline {
}
post {
cleanup {
githubCheckNotify(currentBuild.currentResult == 'SUCCESS' ? 'SUCCESS' : 'FAILURE')
notifyBuildResult(analyzeFlakey: true, flakyReportIdx: "reporter-e2e-tests-end-2-end-tests-pipeline-master", prComment: true)
}
success {
whenTrue(!isPR() && params.notifyOnGreenBuilds) {
doNotify((!isPR() && params.notifyOnGreenBuilds))
}
}
unsuccessful {
whenFalse(isPR()) {
doNotify(!isPR())
}
doNotifyBuildResult(params.notifyOnGreenBuilds)
}
}
}
Expand All @@ -271,7 +260,9 @@ def checkTestSuite(Map parallelTasks = [:], Map item = [:]) {
}
}

def doNotify(boolean notify) {
def doNotifyBuildResult(boolean slackNotify) {
githubCheckNotify(currentBuild.currentResult == 'SUCCESS' ? 'SUCCESS' : 'FAILURE')

def testsSuites = "${params.runTestsSuites}"
if (testsSuites?.trim() == "") {
testsSuites = "All suites"
Expand All @@ -283,7 +274,7 @@ def doNotify(boolean notify) {
}

def header = "*Test Suite*: " + testsSuites
notifyBuildResult(prComment: true, slackHeader: header, slackChannel: "${channels}", slackComment: true, slackNotify: notify)
notifyBuildResult(analyzeFlakey: true, flakyReportIdx: "reporter-e2e-tests-end-2-end-tests-pipeline-${env.JOB_BASE_NAME}", prComment: true, slackHeader: header, slackChannel: "${channels}", slackComment: true, slackNotify: slackNotify)
}


Expand Down

0 comments on commit 2f3d6c2

Please sign in to comment.