From 20b5f05899ac51c02391c835cd9f2c83408c1deb Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 15 Feb 2022 09:07:36 +0000 Subject: [PATCH 1/6] ci: support for next patch release branch --- .ci/schedule-daily.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index ac09d66387a..c66d81c3817 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.', '7.']) } } } @@ -53,6 +53,10 @@ def getBranchName(branch) { if (branch.contains('8.')) { return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor8()) } + // special macro to look for the latest minor version + if (branch.contains('8.')) { + return bumpUtils.getMajorMinor(bumpUtils.getNextPatchReleaseFor8()) + } if (branch.contains('7.')) { return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor7()) } From a652d3ef283b7174a697124eb3d1753d11c2b50f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 15 Feb 2022 09:07:57 +0000 Subject: [PATCH 2/6] ci: support for next minor release branch for the 8 major --- .ci/schedule-daily.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index c66d81c3817..e5f41d5238b 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.', '8.', '7.', '7.']) + updateBeatsBuilds(branches: ['main', '8.', '8.', '8.', '7.']) } } } From 5878c5cb7cf00af4af3babce4206c11c74b006fc Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 15 Feb 2022 09:09:46 +0000 Subject: [PATCH 3/6] ci: next minor for 8 is main --- .ci/schedule-daily.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index e5f41d5238b..3861fca0db3 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.', '8.', '8.', '7.']) + updateBeatsBuilds(branches: ['main', '8.', '8.', '7.']) } } } From 5098712eb6cb6a90f2a4a45216e858e1fc608b2f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 15 Feb 2022 09:10:59 +0000 Subject: [PATCH 4/6] Update .ci/schedule-daily.groovy --- .ci/schedule-daily.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index 3861fca0db3..9ec041120e5 100644 --- a/.ci/schedule-daily.groovy +++ b/.ci/schedule-daily.groovy @@ -53,7 +53,7 @@ def getBranchName(branch) { if (branch.contains('8.')) { return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor8()) } - // special macro to look for the latest minor version + // special macro to look for the next minor version if (branch.contains('8.')) { return bumpUtils.getMajorMinor(bumpUtils.getNextPatchReleaseFor8()) } From 3c5147565e01267617f96afff9b18515319517d4 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 15 Feb 2022 09:11:17 +0000 Subject: [PATCH 5/6] Update .ci/schedule-daily.groovy --- .ci/schedule-daily.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index 9ec041120e5..7e031cefad9 100644 --- a/.ci/schedule-daily.groovy +++ b/.ci/schedule-daily.groovy @@ -53,7 +53,7 @@ def getBranchName(branch) { if (branch.contains('8.')) { return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor8()) } - // special macro to look for the next minor version + // special macro to look for the next patch version if (branch.contains('8.')) { return bumpUtils.getMajorMinor(bumpUtils.getNextPatchReleaseFor8()) } From 1e78173e4de893d0484bfd0946792b88ed36b3a1 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 15 Feb 2022 09:47:17 +0000 Subject: [PATCH 6/6] ci: use getBranchesFromAliases --- .ci/schedule-daily.groovy | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index 3861fca0db3..015039e424c 100644 --- a/.ci/schedule-daily.groovy +++ b/.ci/schedule-daily.groovy @@ -32,36 +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()) - } - // special macro to look for the latest minor version - if (branch.contains('8.')) { - return bumpUtils.getMajorMinor(bumpUtils.getNextPatchReleaseFor8()) - } - if (branch.contains('7.')) { - return bumpUtils.getMajorMinor(bumpUtils.getCurrentMinorReleaseFor7()) - } - if (branch.contains('7.')) { - return bumpUtils.getMajorMinor(bumpUtils.getNextMinorReleaseFor7()) - } - return branch -}