Skip to content

Commit

Permalink
Convert weekly to continuous and possibility to change product version
Browse files Browse the repository at this point in the history
  • Loading branch information
maximenoel8 committed Dec 17, 2024
1 parent 035578b commit 30adafa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)'),
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
// 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" {
type = string
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" {
Expand All @@ -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" {
Expand Down Expand Up @@ -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" ]
Expand All @@ -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" ]
Expand All @@ -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
}
Expand Down

0 comments on commit 30adafa

Please sign in to comment.