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: use getBranchesFromAliases and support next-patch-8 #30400

Merged
merged 1 commit into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
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
28 changes: 2 additions & 26 deletions .ci/schedule-daily.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
stages {
stage('Nighly beats builds') {
steps {
runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.<minor>', '7.<minor>', '7.<next-minor>'])
runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.<minor>', '8.<next-patch>', '7.<minor>'])
}
}
}
Expand All @@ -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 ->
Expand All @@ -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.<minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor8())
}
if (branch.contains('8.<next-minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor8())
}
if (branch.contains('7.<minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor7())
}
if (branch.contains('7.<next-minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor7())
}
return branch
}
28 changes: 2 additions & 26 deletions .ci/schedule-weekly.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
stages {
stage('Weekly beats builds') {
steps {
runBuilds(quietPeriodFactor: 1000, branches: ['main', '8.<minor>', '7.<minor>', '7.<next-minor>'])
runBuilds(quietPeriodFactor: 1000, branches: ['main', '8.<minor>', '8.<next-patch>', '7.<minor>'])
}
}
}
Expand All @@ -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 ->
Expand All @@ -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.<minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor8())
}
if (branch.contains('8.<next-minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor8())
}
if (branch.contains('7.<minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor7())
}
if (branch.contains('7.<next-minor>')) {
return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor7())
}
return branch
}