diff --git a/Jenkinsfile b/Jenkinsfile index 983c7e48ce4a..392f38085e93 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -157,7 +157,7 @@ VERSION=${env.VERSION}-SNAPSHOT""") dir("${BASE_DIR}"){ notifyBuildResult(prComment: true, slackComment: true, slackNotify: (isBranch() || isTag()), - analyzeFlakey: !isTag(), flakyReportIdx: "reporter-beats-beats-${getIdSuffix()}") + analyzeFlakey: !isTag(), jobName: getFlakyJobName(withBranch: getFlakyBranch())) } } } @@ -166,11 +166,10 @@ VERSION=${env.VERSION}-SNAPSHOT""") /** * There are only two supported branches, master and 7.x */ -def getIdSuffix() { +def getFlakyBranch() { if(isPR()) { return getBranchIndice(env.CHANGE_TARGET) - } - if(isBranch()) { + } else { return getBranchIndice(env.BRANCH_NAME) } }