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

Move acceptance tests at PRs to NUE #1429

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,27 @@ 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_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"
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??
Expand All @@ -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") {
Expand All @@ -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??
Expand All @@ -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 {
Expand Down
12 changes: 10 additions & 2 deletions jenkins_pipelines/environments/uyuni-prs-ci-tests
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env groovy

node('pull-request-test') {
node('pull-request-test-nue') {
Copy link
Member

@srbarrios srbarrios Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't care too much where this node is located and this is only used to trigger the pipeline. But.. see below:

        def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request.groovy"
        pipeline.run(params)

We should define the node we want to use, as otherwise, this will always goes through the node defined at this point, meaning always NUE.

Something like:

node(my_calculated_node) {
        def pipeline = load "jenkins_pipelines/environments/common/pipeline-pull-request.groovy"
        pipeline.run(params)
    }

I think, another approach it could be to pass it by param into the run method, and inside it calculate the agent to use.

Make sense for you?

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'),
Expand Down Expand Up @@ -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"
Copy link
Member

@srbarrios srbarrios Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, and really just a matter of taste, I would have both domains as constants in pipeline-pull-request-envs.groovy.
Then use the platform_localisation passed as string parameter in the pipeline to calculate which domain to use inside pipeline-pull-request-envs.groovy.

The reasoning about it, is that those domains might change over the years and we might have multiple pipelines using the pipeline-pull-request-envs.groovy, so it looks more maintainable fmpov.


Related card about domain changes https://github.com/SUSE/spacewalk/issues/25378

} 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;
Expand Down
4 changes: 2 additions & 2 deletions terracumber_config/tf_files/PR-testing-template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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"
}
Expand All @@ -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"
}
Expand All @@ -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"
}
Expand All @@ -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"
}
Expand All @@ -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"
}
Expand Down
Loading