Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI][flaky] Support 7.x branches and PRs #22197

Merged
merged 1 commit into from
Oct 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,41 @@ pipeline {
cleanup {
// Required to enable the flaky test reporting with GitHub. Workspace exists since the post/always runs earlier
dir("${BASE_DIR}"){
// TODO analyzeFlakey does not support other release branches but the master branch.
notifyBuildResult(prComment: true,
slackComment: true, slackNotify: (isBranch() || isTag()),
analyzeFlakey: true, flakyReportIdx: "reporter-beats-beats-master")
analyzeFlakey: !isTag(), flakyReportIdx: "reporter-beats-beats-${getIdSuffix()}")
}
}
}
}

/**
* There are only two supported branches, master and 7.x
*/
def getIdSuffix() {
if(isPR()) {
return getBranchIndice(env.CHANGE_TARGET)
}
if(isBranch()) {
return getBranchIndice(env.BRANCH_NAME)
}
}

/**
* There are only two supported branches, master and 7.x
*/
def getBranchIndice(String compare) {
if (compare?.equals('master') || compare.equals('7.x')) {
return compare
} else {
if (compare.startsWith('7.')) {
return '7.x'
}
}
return 'master'
}


/**
* This method is the one used for running the parallel stages, therefore
* its arguments are passed by the beatsStages step.
Expand Down