diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index 4372d6bd10ec..3d3c23231f0e 100644 --- a/.ci/schedule-daily.groovy +++ b/.ci/schedule-daily.groovy @@ -20,7 +20,7 @@ pipeline { stages { stage('Nighly beats builds') { steps { - runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.', '7.', '7.']) + runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.', '8.', '7.']) } } } @@ -32,14 +32,7 @@ pipeline { } def runBuilds(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) def quietPeriod = 0 branches.each { branch -> @@ -48,20 +41,3 @@ def runBuilds(Map args = [:]) { quietPeriod += args.quietPeriodFactor } } - -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 -} diff --git a/.ci/schedule-weekly.groovy b/.ci/schedule-weekly.groovy index 065ace13cc25..635fc9d898da 100644 --- a/.ci/schedule-weekly.groovy +++ b/.ci/schedule-weekly.groovy @@ -20,7 +20,7 @@ pipeline { stages { stage('Weekly beats builds') { steps { - runBuilds(quietPeriodFactor: 1000, branches: ['main', '8.', '7.', '7.']) + runBuilds(quietPeriodFactor: 1000, branches: ['main', '8.', '8.', '7.']) } } } @@ -32,14 +32,7 @@ pipeline { } def runBuilds(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) def quietPeriod = 0 branches.each { branch -> @@ -48,20 +41,3 @@ def runBuilds(Map args = [:]) { quietPeriod += args.quietPeriodFactor } } - -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 -}