diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index ac09d66387a..015039e424c 100644 --- a/.ci/schedule-daily.groovy +++ b/.ci/schedule-daily.groovy @@ -20,7 +20,7 @@ pipeline { stages { stage('Nighly update Beats builds') { steps { - updateBeatsBuilds(branches: ['main', '8.', '7.', '7.']) + updateBeatsBuilds(branches: ['main', '8.', '8.', '7.']) } } } @@ -32,32 +32,8 @@ pipeline { } def updateBeatsBuilds(Map args = [:]) { - def branches = [] - // Expand macros and filter duplicated matches. - args.branches.each { branch -> - def branchName = getBranchName(branch) - if (!branches.contains(branchName)) { - branches << branchName - } - } + def branches = getBranchesFromAliases(aliases: args.branches) branches.each { branch -> build(job: "apm-server/update-beats-mbp/${branch}", wait: false, propagate: false) } } - -def getBranchName(branch) { - // special macro to look for the latest minor version - if (branch.contains('8.')) { - return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor8()) - } - if (branch.contains('8.')) { - return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor8()) - } - if (branch.contains('7.')) { - return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor7()) - } - if (branch.contains('7.')) { - return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor7()) - } - return branch -}