From 3c126f0562f0ef748105adec82d81b1e62b0c86f Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Fri, 11 Oct 2024 12:25:00 +0200 Subject: [PATCH 1/3] Move acceptance tests from PRs to NUE Running this jenkins pipeline at the same place we have the open build service should make the process faster and less complex. However, in NUE we have less hardware, so we can have max 6 envs. Given we have only 6 envs in NUE and not 10 as we have in PRV, we need to do a cleanup, specifically remove the "custom" pipelines, like "jordi", "qe-squad", and "iron" ones. This way, we have 3 for generic master PR testing, 1 for 4.3 PR, one for master reference, and one for 4.3 reference. Fix rhlike and deblike minion names for PR Testing in NUE Fix domain for pr testing: domain should depend on the localization fix deblike macs in NUE Share environments between uyuni and suma4.3, because we have less hardware but also less users, thus we do not need to rebase. Signed-off-by: Jordi Massaguer Pla --- .../common/pipeline-pull-request-envs.groovy | 46 ++++++------------- .../environments/uyuni-prs-ci-tests | 12 ++++- .../tfvars/PR-testing-NUE-environments.tfvars | 24 +++++----- 3 files changed, 36 insertions(+), 46 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index 289da7f7c..e1c1e7771 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -19,40 +19,22 @@ other_build_repo = 'openSUSE_Leap_15.5' url_prefix="https://ci.suse.de/view/Manager/view/Uyuni/job/${env.JOB_NAME}" product_name = "Uyuni" short_product_name = "suma" -update_repo = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/some-updates/" -additional_repo = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/dummy/" +update_repo = "http://minima-mirror-ci-bv.${domain}/jordi/some-updates/" +additional_repo = "http://minima-mirror-ci-bv.${domain}/jordi/dummy/" build_packages = true -if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { - first_env = 10; - last_env = 10; - // if you change the sumaform repo or reference, you need to remove the sumaform directory from the results folder - sumaform_gitrepo = "https://github.com/jordimassaguerpla/sumaform.git"; - sumaform_ref = "add_fixes_to_combustion_and_add_pr_fixes"; -} else if (env.JOB_NAME == "uyuni-prs-ci-tests-ion") { - first_env = 7; - last_env = 7; - // if you change the sumaform repo or reference, you need to remove the sumaform directory from the results folder - sumaform_gitrepo = "https://github.com/uyuni-project/sumaform.git"; - sumaform_ref = "master-cobbler-3.3.1"; -} else if (env.JOB_NAME == "uyuni-prs-ci-tests-qe") { - first_env = 8; - last_env = 8; - // if you change the sumaform repo or reference, you need to remove the sumaform directory from the results folder - sumaform_gitrepo = "https://github.com/uyuni-project/sumaform.git"; - sumaform_ref = "revert-1704-revert-zypper-in-clout-init"; +if (env.JOB_NAME == "uyuni-prs-ci-tests") { + first_env = 1; + last_env = 5; } else if (env.JOB_NAME == "uyuni-prs-ci-tests-reference") { // email aliases for slack channel discuss-susemanager-pr-tests-results email_to = "discuss-susemanager-p-aaaag32rrv4bcp3adzknwc42m4@suse.slack.com"; pull_request_number = "master"; - first_env = 9; - last_env = 9; - additional_repo_url = "http://minima-mirror-ci-bv.mgr.prv.suse.net/pull-request-repositories/reference_job_additional_repo"; -} else if (env.JOB_NAME == "uyuni-prs-ci-tests") { - first_env = 1; - last_env = 4; + first_env = 6; + last_env = 6; + additional_repo_url = "http://minima-mirror-ci-bv.${domain}/pull-request-repositories/reference_job_additional_repo"; } else if (env.JOB_NAME == "suma43-prs-ci-tests") { - first_env =5; + first_env = 1; last_env = 5; // spacewalk suma43 settings // TODO: what happens if we change the environment? Will it break the environment?? @@ -76,8 +58,8 @@ if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { url_prefix="https://ci.suse.de/view/Manager/view/Manager-4.3/job/${env.JOB_NAME}" product_name = "SUSE-Manager-4.3" short_product_name = "suma43" - update_repo = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/some-updates43/" - additional_repo = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/dummy43/" + update_repo = "http://minima-mirror-ci-bv.${domain}/jordi/some-updates43/" + additional_repo = "http://minima-mirror-ci-bv.${domain}/jordi/dummy43/" rn_package = "release-notes-susemanager" rn_project = "Devel:Galaxy:Manager:4.3:ToSLE" } else if (env.JOB_NAME == "suma43-prs-ci-tests-reference") { @@ -86,7 +68,7 @@ if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { cucumber_ref = "Manager-4.3"; pull_request_number = "Manager-4.3"; product_version = "manager43"; - first_env =6; + first_env = 6; last_env = 6; // spacewalk suma43 settings // TODO: what happens if we change the environment? Will it break the environment?? @@ -110,8 +92,8 @@ if (env.JOB_NAME == "uyuni-prs-ci-tests-jordi") { url_prefix="https://ci.suse.de/view/Manager/view/Manager-4.3/job/${env.JOB_NAME}" product_name = "SUSE-Manager-4.3" short_product_name = "suma43" - update_repo = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/some-updates43/" - additional_repo = "http://minima-mirror-ci-bv.mgr.prv.suse.net/jordi/dummy43/" + update_repo = "http://minima-mirror-ci-bv.${domain}/jordi/some-updates43/" + additional_repo = "http://minima-mirror-ci-bv.${domain}/jordi/dummy43/" rn_package = "release-notes-susemanager" rn_project = "Devel:Galaxy:Manager:4.3:ToSLE" } else { diff --git a/jenkins_pipelines/environments/uyuni-prs-ci-tests b/jenkins_pipelines/environments/uyuni-prs-ci-tests index c9f39a583..a89c8400c 100644 --- a/jenkins_pipelines/environments/uyuni-prs-ci-tests +++ b/jenkins_pipelines/environments/uyuni-prs-ci-tests @@ -1,10 +1,10 @@ #!/usr/bin/env groovy -node('pull-request-test') { +node('pull-request-test-nue') { properties([ buildDiscarder(logRotator(numToKeepStr: '30')), parameters([ - string(name: 'platform_localisation', defaultValue: 'PRV', description: 'Decide if it will be run in \'PRV\' or \'NUE\''), + string(name: 'platform_localisation', defaultValue: 'NUE', description: 'Decide if it will be run in \'PRV\' or \'NUE\''), string(name: 'product_version', defaultValue: 'uyuni', description: 'Select if we are using \'uyuni\' or \'manager43\' project'), string(name: 'pull_request_number', defaultValue: '', description: 'Required: Uyuni Pull Request Number'), string(name: 'email_to', defaultValue: '', description: 'Recommended: Receive a report to your e-mail when it finishes with links to the results, artifacts and logs'), @@ -35,6 +35,14 @@ node('pull-request-test') { first_env = 1; last_env = 10; email_to = params.email_to; + if (platform_localisation == "NUE") { + domain = "mgr.suse.de" + } else if (platform_localisation == "PRV") { + domain = "mgr.prv.suse.net" + } else { + print("Platform not supporeted"); + sh "exit 1" + } run_all_scopes = params.run_all_scopes; pull_request_number = params.pull_request_number.trim(); additional_repo_url = params.additional_repo_url; diff --git a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars index 07ed27a75..8ba249543 100644 --- a/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars +++ b/terracumber_config/tf_files/tfvars/PR-testing-NUE-environments.tfvars @@ -13,8 +13,8 @@ ENVIRONMENT_CONFIGURATION = { proxy = "aa:b2:93:01:03:52" suse-minion = "aa:b2:93:01:03:54" suse-sshminion = "aa:b2:93:01:03:55" - redhat-minion = "aa:b2:93:01:03:56" - debian-minion = "aa:b2:93:01:03:57" + rhlike-minion = "aa:b2:93:01:03:56" + deblike-minion = "aa:b2:93:01:03:57" build-host = "aa:b2:93:01:03:59" kvm-host = "aa:b2:93:01:03:5a" } @@ -30,8 +30,8 @@ ENVIRONMENT_CONFIGURATION = { proxy = "aa:b2:93:01:03:5e" suse-minion = "aa:b2:93:01:03:60" suse-sshminion = "aa:b2:93:01:03:61" - redhat-minion = "aa:b2:93:01:03:62" - debian-minion = "aa:b2:93:01:03:64" + rhlike-minion = "aa:b2:93:01:03:62" + deblike-minion = "aa:b2:93:01:03:63" build-host = "aa:b2:93:01:03:65" kvm-host = "aa:b2:93:01:03:66" } @@ -47,8 +47,8 @@ ENVIRONMENT_CONFIGURATION = { proxy = "aa:b2:93:01:03:6a" suse-minion = "aa:b2:93:01:03:6c" suse-sshminion = "aa:b2:93:01:03:6d" - redhat-minion = "aa:b2:93:01:03:6e" - debian-minion = "aa:b2:93:01:03:70" + rhlike-minion = "aa:b2:93:01:03:6e" + deblike-minion = "aa:b2:93:01:03:6f" build-host = "aa:b2:93:01:03:71" kvm-host = "aa:b2:93:01:03:72" } @@ -64,8 +64,8 @@ ENVIRONMENT_CONFIGURATION = { proxy = "aa:b2:93:01:03:76" suse-minion = "aa:b2:93:01:03:78" suse-sshminion = "aa:b2:93:01:03:79" - redhat-minion = "aa:b2:93:01:03:7a" - debian-minion = "aa:b2:93:01:03:7c" + rhlike-minion = "aa:b2:93:01:03:7a" + deblike-minion = "aa:b2:93:01:03:7b" build-host = "aa:b2:93:01:03:7d" kvm-host = "aa:b2:93:01:03:7e" } @@ -81,8 +81,8 @@ ENVIRONMENT_CONFIGURATION = { proxy = "aa:b2:93:01:03:82" suse-minion = "aa:b2:93:01:03:84" suse-sshminion = "aa:b2:93:01:03:85" - redhat-minion = "aa:b2:93:01:03:86" - debian-minion = "aa:b2:93:01:03:88" + rhlike-minion = "aa:b2:93:01:03:86" + deblike-minion = "aa:b2:93:01:03:87" build-host = "aa:b2:93:01:03:89" kvm-host = "aa:b2:93:01:03:8a" } @@ -98,8 +98,8 @@ ENVIRONMENT_CONFIGURATION = { proxy = "aa:b2:93:01:03:8e" suse-minion = "aa:b2:93:01:03:90" suse-sshminion = "aa:b2:93:01:03:91" - redhat-minion = "aa:b2:93:01:03:92" - debian-minion = "aa:b2:93:01:03:94" + rhlike-minion = "aa:b2:93:01:03:92" + deblike-minion = "aa:b2:93:01:03:93" build-host = "aa:b2:93:01:03:95" kvm-host = "aa:b2:93:01:03:96" } From 7b85565961d44a20e36bb830d4934d827ac20146 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Wed, 16 Oct 2024 19:32:30 +0200 Subject: [PATCH 2/3] PR Testing: Move to 15.6 fix container url build repos is 15.6 Signed-off-by: Jordi Massaguer Pla --- .../environments/common/pipeline-pull-request-envs.groovy | 2 +- terracumber_config/tf_files/PR-testing-template.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index e1c1e7771..d54278182 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -14,7 +14,7 @@ openSUSE_client_repo = "${source_project}:openSUSE_Leap_15-Uyuni-Client-Tools" ubuntu_client_repo = "${source_project}:Ubuntu2204-Uyuni-Client-Tools" sumaform_tools_project = 'systemsmanagement:sumaform:tools' test_packages_project = 'systemsmanagement:Uyuni:Test-Packages:Pool' -build_repo = 'openSUSE_Leap_15.5' +build_repo = 'openSUSE_Leap_15.6' other_build_repo = 'openSUSE_Leap_15.5' url_prefix="https://ci.suse.de/view/Manager/view/Uyuni/job/${env.JOB_NAME}" product_name = "Uyuni" diff --git a/terracumber_config/tf_files/PR-testing-template.tf b/terracumber_config/tf_files/PR-testing-template.tf index 3cb6ad2fc..3ae3904f7 100644 --- a/terracumber_config/tf_files/PR-testing-template.tf +++ b/terracumber_config/tf_files/PR-testing-template.tf @@ -72,7 +72,7 @@ module "cucumber_testsuite" { } main_disk_size = 400 runtime = "podman" - container_repository = "registry.opensuse.org/systemsmanagement/uyuni/master/containers_leap_15.6" + container_repository = "registry.opensuse.org/systemsmanagement/uyuni/master/containers" helm_chart_url = "oci://registry.opensuse.org/systemsmanagement/uyuni/master/charts/uyuni/server" login_timeout = 28800 additional_repos_only = var.ADDITIONAL_REPOS_ONLY @@ -82,7 +82,7 @@ module "cucumber_testsuite" { main_disk_size = 500 } proxy_containerized = { - container_repository = "registry.opensuse.org/systemsmanagement/uyuni/master/containers_leap_15.6" + container_repository = "registry.opensuse.org/systemsmanagement/uyuni/master/containers" container_tag = "latest" image = var.PROXY_IMAGE provider_settings = { From a5b27a5c827190b4774e591b6c98c2e05ebf84e1 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Fri, 18 Oct 2024 13:44:09 +0200 Subject: [PATCH 3/3] fix build repo Signed-off-by: Jordi Massaguer Pla --- .../environments/common/pipeline-pull-request-envs.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy index d54278182..a8d60ae79 100644 --- a/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy +++ b/jenkins_pipelines/environments/common/pipeline-pull-request-envs.groovy @@ -14,7 +14,7 @@ openSUSE_client_repo = "${source_project}:openSUSE_Leap_15-Uyuni-Client-Tools" ubuntu_client_repo = "${source_project}:Ubuntu2204-Uyuni-Client-Tools" sumaform_tools_project = 'systemsmanagement:sumaform:tools' test_packages_project = 'systemsmanagement:Uyuni:Test-Packages:Pool' -build_repo = 'openSUSE_Leap_15.6' +build_repo = 'openSUSE_Leap_Micro_5.5' other_build_repo = 'openSUSE_Leap_15.5' url_prefix="https://ci.suse.de/view/Manager/view/Uyuni/job/${env.JOB_NAME}" product_name = "Uyuni"