Skip to content

Commit 786356c

Browse files
v1vnarph
authored andcommitted
ci: use the getBranchesFromAliases step (#55)
1 parent 2f7f145 commit 786356c

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

.ci/schedule-daily.groovy

+2-28
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pipeline {
2020
stages {
2121
stage('Nighly beats builds') {
2222
steps {
23-
runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.<minor>', '7.<minor>', '7.<next-minor>'])
23+
runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.<minor>', '8.<next-patch>', '7.<minor>'])
2424
}
2525
}
2626
}
@@ -32,15 +32,7 @@ pipeline {
3232
}
3333

3434
def runBuilds(Map args = [:]) {
35-
def branches = []
36-
// Expand macros and filter duplicated matches.
37-
args.branches.each { branch ->
38-
def branchName = getBranchName(branch)
39-
if (!branches.contains(branchName)) {
40-
branches << branchName
41-
}
42-
}
43-
35+
def branches = getBranchesFromAliases(aliases: args.branches)
4436
def quietPeriod = 0
4537
branches.each { branch ->
4638
build(quietPeriod: quietPeriod,
@@ -50,24 +42,6 @@ def runBuilds(Map args = [:]) {
5042
booleanParam(name: 'end_to_end_tests_ci', value: true)
5143
],
5244
wait: false, propagate: false)
53-
// Increate the quiet period for the next iteration
5445
quietPeriod += args.quietPeriodFactor
5546
}
5647
}
57-
58-
def getBranchName(branch) {
59-
// special macro to look for the latest minor version
60-
if (branch.contains('8.<minor>')) {
61-
return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor8())
62-
}
63-
if (branch.contains('8.<next-minor>')) {
64-
return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor8())
65-
}
66-
if (branch.contains('7.<minor>')) {
67-
return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor7())
68-
}
69-
if (branch.contains('7.<next-minor>')) {
70-
return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor7())
71-
}
72-
return branch
73-
}

0 commit comments

Comments
 (0)