From 30adafa212328ad452f52a3d6703a30bb368d06a Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Tue, 17 Dec 2024 14:34:41 +1300 Subject: [PATCH] Convert weekly to continuous and possibility to change product version --- .../common/pipeline-build-validation.groovy | 2 +- ...anager-qe-build-validation-continuous-NUE} | 7 ++-- ...anager-build-validation-continuous-NUE.tf} | 33 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) rename jenkins_pipelines/environments/{manager-5.0-qe-build-validation-weekly-NUE => manager-qe-build-validation-continuous-NUE} (92%) rename terracumber_config/tf_files/{SUSEManager-5.0-build-validation-weekly-NUE.tf => SUSEManager-build-validation-continuous-NUE.tf} (98%) diff --git a/jenkins_pipelines/environments/common/pipeline-build-validation.groovy b/jenkins_pipelines/environments/common/pipeline-build-validation.groovy index ed5dfab1b..02dbb223a 100644 --- a/jenkins_pipelines/environments/common/pipeline-build-validation.groovy +++ b/jenkins_pipelines/environments/common/pipeline-build-validation.groovy @@ -62,7 +62,7 @@ def run(params) { } } // Run Terracumber to deploy the environment - sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_CONTAINER_REPOSITORY=${container_repository}; export TF_VAR_CUCUMBER_GITREPO=${params.cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${params.cucumber_ref}; export TERRAFORM=${params.terraform_bin}; export TERRAFORM_PLUGINS=${params.terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log --init --taint '.*(domain|main_disk|data_disk|database_disk|standalone_provisioning|server_extra_nfs_mounts).*' --custom-repositories ${WORKSPACE}/custom_repositories.json --sumaform-backend ${params.sumaform_backend} --use-tf-resource-cleaner --tf-resources-to-keep ${params.minions_to_run.split(', ').join(' ')} --runstep provision" + sh "set +x; source /home/jenkins/.credentials set -x; export TF_VAR_CONTAINER_REPOSITORY=${container_repository}; export TF_VAR_CUCUMBER_GITREPO=${params.cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${params.cucumber_ref}; export TF_VAR_PRODUCT_VERSION=${params.product_version}; export TERRAFORM=${params.terraform_bin}; export TERRAFORM_PLUGINS=${params.terraform_bin_plugins}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform.log --init --taint '.*(domain|main_disk|data_disk|database_disk|standalone_provisioning|server_extra_nfs_mounts).*' --custom-repositories ${WORKSPACE}/custom_repositories.json --sumaform-backend ${params.sumaform_backend} --use-tf-resource-cleaner --tf-resources-to-keep ${params.minions_to_run.split(', ').join(' ')} --runstep provision" // Generate features sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd '${env.exports} cd /root/spacewalk/testsuite; rake utils:generate_build_validation_features'" // Generate rake files diff --git a/jenkins_pipelines/environments/manager-5.0-qe-build-validation-weekly-NUE b/jenkins_pipelines/environments/manager-qe-build-validation-continuous-NUE similarity index 92% rename from jenkins_pipelines/environments/manager-5.0-qe-build-validation-weekly-NUE rename to jenkins_pipelines/environments/manager-qe-build-validation-continuous-NUE index 9705fce31..9e06cb24a 100644 --- a/jenkins_pipelines/environments/manager-5.0-qe-build-validation-weekly-NUE +++ b/jenkins_pipelines/environments/manager-qe-build-validation-continuous-NUE @@ -23,9 +23,9 @@ node('sumaform-cucumber') { buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '3')), disableConcurrentBuilds(), parameters([ - string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/SUSE/spacewalk.git', description: 'Testsuite Git Repository'), - string(name: 'cucumber_ref', defaultValue: 'Manager-5.0', description: 'Branch prepared for the MU tested'), - string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-5.0-build-validation-weekly-NUE.tf', description: 'Path to the tf file to be used'), + string(name: 'cucumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/uyuni.git', description: 'Testsuite Git Repository'), + string(name: 'cucumber_ref', defaultValue: 'manager', description: 'Branch prepared for the MU tested'), + string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-build-validation-continuous-NUE.tf', description: 'Path to the tf file to be used'), string(name: 'sumaform_gitrepo', defaultValue: 'https://github.com/uyuni-project/sumaform.git', description: 'Sumaform Git Repository'), string(name: 'sumaform_ref', defaultValue: 'master', description: 'Sumaform Git reference (branch, tag...)'), choice(name: 'sumaform_backend', choices: ['libvirt'], description: 'Sumaform backend to be used (see https://github.com/uyuni-project/sumaform#backend-choice)'), @@ -35,6 +35,7 @@ node('sumaform-cucumber') { // Temporary: should move to uyuni-project string(name: 'terracumber_gitrepo', defaultValue: 'https://github.com/uyuni-project/terracumber.git', description: 'Terracumber Git Repository'), string(name: 'terracumber_ref', defaultValue: 'master', description: 'Terracumber Git ref (branch, tag...)'), + string(name: 'product_version', defaultValue: 'head', description: 'Server product version'), extendedChoice(name: 'minions_to_run', multiSelectDelimiter: ', ', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX', visibleItemCount: 15, value: minionList, defaultValue: minionList, diff --git a/terracumber_config/tf_files/SUSEManager-5.0-build-validation-weekly-NUE.tf b/terracumber_config/tf_files/SUSEManager-build-validation-continuous-NUE.tf similarity index 98% rename from terracumber_config/tf_files/SUSEManager-5.0-build-validation-weekly-NUE.tf rename to terracumber_config/tf_files/SUSEManager-build-validation-continuous-NUE.tf index 5bd4f5af9..3314e58b6 100644 --- a/terracumber_config/tf_files/SUSEManager-5.0-build-validation-weekly-NUE.tf +++ b/terracumber_config/tf_files/SUSEManager-build-validation-continuous-NUE.tf @@ -1,23 +1,17 @@ // Mandatory variables for terracumber variable "URL_PREFIX" { type = string - default = "https://ci.suse.de/view/Manager/view/Manager-qe/job/manager-5.0-qe-build-validation-NUE" -} - -// Not really used as this is for --runall parameter, and we run cucumber step by step -variable "CUCUMBER_COMMAND" { - type = string - default = "export PRODUCT='SUSE-Manager' && run-testsuite" + default = "https://ci.suse.de/view/Manager/view/Manager-qe/job/manager-qe-build-validation-continuous-NUE" } variable "CUCUMBER_GITREPO" { type = string - default = "https://github.com/SUSE/spacewalk.git" + default = "https://github.com/uyuni-project/uyuni.git" } variable "CUCUMBER_BRANCH" { type = string - default = "Manager-5.0" + default = "master" } variable "CUCUMBER_RESULTS" { @@ -25,9 +19,14 @@ variable "CUCUMBER_RESULTS" { default = "/root/spacewalk/testsuite" } +variable "PRODUCT_VERSION" { + type = string + default = "head" +} + variable "MAIL_SUBJECT" { type = string - default = "Results 5.0 Build Validation $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" + default = "Results Continuous Build Validation $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" } variable "MAIL_TEMPLATE" { @@ -37,7 +36,7 @@ variable "MAIL_TEMPLATE" { variable "MAIL_SUBJECT_ENV_FAIL" { type = string - default = "Results HEAD Build Validation: Environment setup failed" + default = "Results Continuous Build Validation: Environment setup failed" } variable "MAIL_TEMPLATE_ENV_FAIL" { @@ -116,8 +115,8 @@ module "base_core" { cc_username = var.SCC_USER cc_password = var.SCC_PASSWORD - product_version = "5.0-released" - name_prefix = "suma-bv-weekly-50-" + product_version = var.PRODUCT_VERSION + name_prefix = "suma-bv-continuous-" use_avahi = false domain = "mgr.suse.de" images = [ "sles12sp5o", "sles15sp2o", "sles15sp3o", "sles15sp4o", "sles15sp5o", "sles15sp6o", "slemicro51-ign", "slemicro52-ign", "slemicro53-ign", "slemicro54-ign", "slemicro55o", "slmicro60o", "almalinux8o", "almalinux9o", "centos7o", "libertylinux9o", "oraclelinux9o", "rocky8o", "rocky9o", "ubuntu2004o", "ubuntu2204o", "ubuntu2404o", "debian11o", "debian12o", "opensuse155o", "opensuse156armo" ] @@ -143,8 +142,8 @@ module "base_arm" { cc_username = var.SCC_USER cc_password = var.SCC_PASSWORD - product_version = "5.0-released" - name_prefix = "suma-bv-weekly-50-" + product_version = var.PRODUCT_VERSION + name_prefix = "suma-bv-continuous-" use_avahi = false domain = "mgr.suse.de" images = [ "opensuse155armo", "opensuse156armo" ] @@ -163,9 +162,9 @@ module "base_arm" { module "base_s390" { source = "./backend_modules/feilong/base" - name_prefix = "suma-bv-weekly-50-" + name_prefix = "suma-bv-continuous-" domain = "mgr.suse.de" - product_version = "5.0-released" + product_version = var.PRODUCT_VERSION testsuite = true }