From a4313c5d0b2b3d65702a706c73bc9c3995b95816 Mon Sep 17 00:00:00 2001 From: Vasyl Yurkovych <59879559+yurkovychv@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:07:18 +0300 Subject: [PATCH 1/3] PMM-7 control latest version for ami upgrade matrix --- pmm/pmm2-ami-upgrade-tests-matrix.groovy | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pmm/pmm2-ami-upgrade-tests-matrix.groovy b/pmm/pmm2-ami-upgrade-tests-matrix.groovy index 985ef4b254..bdb3dca149 100644 --- a/pmm/pmm2-ami-upgrade-tests-matrix.groovy +++ b/pmm/pmm2-ami-upgrade-tests-matrix.groovy @@ -18,6 +18,7 @@ String enableTestingRepo String pmmServerLatestVersion List amiVersions = pmmVersion('ami').keySet() as List List versions = amiVersions[-5..-1] +def latestVersion = pmmVersion() def parallelStagesMatrix = versions.collectEntries {String it -> // Skip versions "2.40.1" and "2.42.0" if (it == "2.40.1" || it == "2.42.0") { @@ -25,12 +26,10 @@ def parallelStagesMatrix = versions.collectEntries {String it -> } if ("${params.UPGRADE_TO}" == "dev-latest") { enableTestingRepo = 'no' - pmmServerLatestVersion = pmmVersion() } else { enableTestingRepo = 'yes' - pmmServerLatestVersion = pmmVersion('rc') } - ["${it} -> ${pmmServerLatestVersion}" : generateStage(it, pmmServerLatestVersion, enableTestingRepo)] + ["${it} -> ${pmmServerLatestVersion}" : generateStage(it, PMM_SERVER_LATEST, enableTestingRepo)] } def generateStage(String version, String latest, String enableRepo) { @@ -54,6 +53,10 @@ pipeline { defaultValue: 'main', description: 'Tag/Branch for pmm-qa repository', name: 'PMM_QA_BRANCH') + string( + defaultValue: latestVersion, + description: 'latest PMM Server Version', + name: 'PMM_SERVER_LATEST') choice( choices: ['dev-latest', 'release candidate'], description: 'Upgrade to:', From 843f6fa966ce01e4f4340ae0c29a69d6aa14a1b4 Mon Sep 17 00:00:00 2001 From: Vasyl Yurkovych <59879559+yurkovychv@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:08:54 +0300 Subject: [PATCH 2/3] Update pmm2-ami-upgrade-tests-matrix.groovy --- pmm/pmm2-ami-upgrade-tests-matrix.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmm/pmm2-ami-upgrade-tests-matrix.groovy b/pmm/pmm2-ami-upgrade-tests-matrix.groovy index bdb3dca149..e5c21af3c5 100644 --- a/pmm/pmm2-ami-upgrade-tests-matrix.groovy +++ b/pmm/pmm2-ami-upgrade-tests-matrix.groovy @@ -29,7 +29,7 @@ def parallelStagesMatrix = versions.collectEntries {String it -> } else { enableTestingRepo = 'yes' } - ["${it} -> ${pmmServerLatestVersion}" : generateStage(it, PMM_SERVER_LATEST, enableTestingRepo)] + ["${it} -> ${pmmServerLatestVersion}" : generateStage(it, params.PMM_SERVER_LATEST, enableTestingRepo)] } def generateStage(String version, String latest, String enableRepo) { From f87675fc13187323bbac23f47ce69ac7e82f0cfe Mon Sep 17 00:00:00 2001 From: Vasyl Yurkovych <59879559+yurkovychv@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:10:19 +0300 Subject: [PATCH 3/3] Update pmm2-ami-upgrade-tests-matrix.groovy --- pmm/pmm2-ami-upgrade-tests-matrix.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pmm/pmm2-ami-upgrade-tests-matrix.groovy b/pmm/pmm2-ami-upgrade-tests-matrix.groovy index e5c21af3c5..726f6387b2 100644 --- a/pmm/pmm2-ami-upgrade-tests-matrix.groovy +++ b/pmm/pmm2-ami-upgrade-tests-matrix.groovy @@ -29,7 +29,8 @@ def parallelStagesMatrix = versions.collectEntries {String it -> } else { enableTestingRepo = 'yes' } - ["${it} -> ${pmmServerLatestVersion}" : generateStage(it, params.PMM_SERVER_LATEST, enableTestingRepo)] + pmmServerLatestVersion = params.PMM_SERVER_LATEST + ["${it} -> ${pmmServerLatestVersion}" : generateStage(it, pmmServerLatestVersion, enableTestingRepo)] } def generateStage(String version, String latest, String enableRepo) {