-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create sle maintenance update pipeline nue (#1419)
- Loading branch information
1 parent
2255b2c
commit fa99ee7
Showing
9 changed files
with
543 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
jenkins_pipelines/environments/manager-4.3-qe-sle-update-NUE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env groovy | ||
|
||
node('sumaform-cucumber') { | ||
def minionList = 'sles15sp4_minion' | ||
properties([ | ||
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-4.3', description: 'Branch prepared for the MU tested'), | ||
string(name: 'tf_file', defaultValue: 'susemanager-ci/terracumber_config/tf_files/SUSEManager-4.3-SLE-update-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)'), | ||
choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), | ||
choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), | ||
string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), | ||
// 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...)'), | ||
extendedChoice(name: 'minions_to_run', multiSelectDelimiter: ', ', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX', visibleItemCount: 15, | ||
value: minionList, | ||
defaultValue: minionList, | ||
description: 'Node list to run during BV'), | ||
// This is different than other pipelines to make it work with the simple proxy_traditional without refactoring all feature files | ||
booleanParam(name: 'use_previous_terraform_state', defaultValue: true, description: 'Use previous Terraform state'), | ||
booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'), | ||
booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'), | ||
booleanParam(name: 'must_sync', defaultValue: true, description: 'Sync. products and channels'), | ||
booleanParam(name: 'enable_proxy_stages', defaultValue: true, description: 'Run Proxy stages'), | ||
booleanParam(name: 'enable_client_stages', defaultValue: true, description: 'Run Client stages'), | ||
booleanParam(name: 'must_add_MU_repositories', defaultValue: true, description: 'Add MU channels'), | ||
booleanParam(name: 'must_add_non_MU_repositories', defaultValue: true, description: 'Add non MU channels'), | ||
booleanParam(name: 'must_add_keys', defaultValue: true, description: 'Add Activation Keys'), | ||
booleanParam(name: 'must_create_bootstrap_repos', defaultValue: true, description: 'Create bootstrap repositories'), | ||
booleanParam(name: 'must_boot_node', defaultValue: true, description: 'Bootstrap Node'), | ||
booleanParam(name: 'must_run_tests', defaultValue: true, description: 'Run Smoke Tests'), | ||
booleanParam(name: 'must_run_containerization_tests', defaultValue: false, description: 'Run Containerization Tests'), | ||
booleanParam(name: 'confirm_before_continue', defaultValue: false, description: 'Confirmation button between stages'), | ||
text(name: 'custom_repositories', defaultValue: '{}', description: 'Salt & Client Tools SLE Update Repositories for each client, in json format') | ||
]) | ||
]) | ||
|
||
stage('Checkout pipeline') { | ||
checkout scm | ||
} | ||
non_MU_channels_tasks_file = 'susemanager-ci/jenkins_pipelines/data/non_MU_channels_tasks_43.json' | ||
def pipeline = load "jenkins_pipelines/environments/common/pipeline-build-validation.groovy" | ||
pipeline.run(params) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
jenkins_pipelines/environments/manager-5.0-qe-sle-update-NUE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env groovy | ||
|
||
node('sumaform-cucumber') { | ||
def minionList = 'sles15sp6_minion' | ||
properties([ | ||
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-SLE-update-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)'), | ||
choice(name: 'terraform_bin', choices: ['/usr/bin/terraform'], description: 'Terraform binary path'), | ||
choice(name: 'terraform_bin_plugins', choices: ['/usr/bin'], description: 'Terraform plugins path'), | ||
string(name: 'terraform_parallelism', defaultValue: '', description: 'Advanced: Define the number of parallel resource operations for terraform'), | ||
// 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...)'), | ||
extendedChoice(name: 'minions_to_run', multiSelectDelimiter: ', ', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX', visibleItemCount: 15, | ||
value: minionList, | ||
defaultValue: minionList, | ||
description: 'Node list to run during BV'), | ||
// This is different than other pipelines to make it work with the simple proxy_traditional without refactoring all feature files | ||
booleanParam(name: 'use_previous_terraform_state', defaultValue: true, description: 'Use previous Terraform state'), | ||
booleanParam(name: 'must_deploy', defaultValue: true, description: 'Deploy'), | ||
booleanParam(name: 'must_run_core', defaultValue: true, description: 'Run Core features'), | ||
booleanParam(name: 'must_sync', defaultValue: true, description: 'Sync. products and channels'), | ||
booleanParam(name: 'enable_proxy_stages', defaultValue: true, description: 'Run Proxy stages'), | ||
booleanParam(name: 'enable_client_stages', defaultValue: true, description: 'Run Client stages'), | ||
booleanParam(name: 'must_add_MU_repositories', defaultValue: true, description: 'Add MU channels'), | ||
booleanParam(name: 'must_add_non_MU_repositories', defaultValue: true, description: 'Add non MU channels'), | ||
booleanParam(name: 'must_add_keys', defaultValue: true, description: 'Add Activation Keys'), | ||
booleanParam(name: 'must_create_bootstrap_repos', defaultValue: true, description: 'Create bootstrap repositories'), | ||
booleanParam(name: 'must_boot_node', defaultValue: true, description: 'Bootstrap Node'), | ||
booleanParam(name: 'must_run_tests', defaultValue: true, description: 'Run Smoke Tests'), | ||
booleanParam(name: 'must_run_containerization_tests', defaultValue: false, description: 'Run Containerization Tests'), | ||
booleanParam(name: 'confirm_before_continue', defaultValue: false, description: 'Confirmation button between stages'), | ||
text(name: 'custom_repositories', defaultValue: '{}', description: 'Salt & Client Tools SLE Update Repositories for each client, in json format') | ||
]) | ||
]) | ||
|
||
stage('Checkout pipeline') { | ||
checkout scm | ||
} | ||
non_MU_channels_tasks_file = 'susemanager-ci/jenkins_pipelines/data/non_MU_channels_tasks_50.json' | ||
def pipeline = load "jenkins_pipelines/environments/common/pipeline-build-validation.groovy" | ||
pipeline.run(params) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
216 changes: 216 additions & 0 deletions
216
terracumber_config/tf_files/SUSEManager-4.3-SLE-update-NUE.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
// Mandatory variables for terracumber | ||
variable "URL_PREFIX" { | ||
type = string | ||
default = "https://ci.suse.de/view/Manager/view/Manager-4.3/job/manager-4.3-qe-sle-update-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" | ||
} | ||
|
||
variable "CUCUMBER_GITREPO" { | ||
type = string | ||
default = "https://github.com/SUSE/spacewalk.git" | ||
} | ||
|
||
variable "CUCUMBER_BRANCH" { | ||
type = string | ||
default = "Manager-4.3" | ||
} | ||
|
||
variable "CUCUMBER_RESULTS" { | ||
type = string | ||
default = "/root/spacewalk/testsuite" | ||
} | ||
|
||
variable "MAIL_SUBJECT" { | ||
type = string | ||
default = "Results 4.3 SLE Update $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" | ||
} | ||
|
||
variable "MAIL_TEMPLATE" { | ||
type = string | ||
default = "../mail_templates/mail-template-jenkins.txt" | ||
} | ||
|
||
variable "MAIL_SUBJECT_ENV_FAIL" { | ||
type = string | ||
default = "Results 4.3 SLE Update: Environment setup failed" | ||
} | ||
|
||
variable "MAIL_TEMPLATE_ENV_FAIL" { | ||
type = string | ||
default = "../mail_templates/mail-template-jenkins-env-fail.txt" | ||
} | ||
|
||
variable "MAIL_FROM" { | ||
type = string | ||
default = "galaxy-noise@suse.de" | ||
} | ||
|
||
variable "MAIL_TO" { | ||
type = string | ||
default = "galaxy-noise@suse.de" | ||
} | ||
|
||
// sumaform specific variables | ||
variable "SCC_USER" { | ||
type = string | ||
} | ||
|
||
variable "SCC_PASSWORD" { | ||
type = string | ||
} | ||
|
||
variable "GIT_USER" { | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "GIT_PASSWORD" { | ||
type = string | ||
default = null | ||
} | ||
|
||
terraform { | ||
required_version = "1.0.10" | ||
required_providers { | ||
libvirt = { | ||
source = "dmacvicar/libvirt" | ||
version = "0.6.3" | ||
} | ||
} | ||
} | ||
|
||
provider "libvirt" { | ||
uri = "qemu+tcp://suma-08.mgr.suse.de/system" | ||
} | ||
|
||
module "base" { | ||
source = "./modules/base" | ||
|
||
cc_username = var.SCC_USER | ||
cc_password = var.SCC_PASSWORD | ||
product_version = "4.3-released" | ||
name_prefix = "suma-su-43-" | ||
use_avahi = false | ||
domain = "mgr.suse.de" | ||
images = [ "sles15sp4o", "opensuse155o" ] | ||
|
||
mirror = "minima-mirror-ci-bv.mgr.suse.de" | ||
use_mirror_images = true | ||
|
||
testsuite = true | ||
|
||
provider_settings = { | ||
pool = "ssd" | ||
bridge = "br1" | ||
} | ||
} | ||
|
||
module "server" { | ||
source = "./modules/server" | ||
base_configuration = module.base.configuration | ||
name = "server" | ||
provider_settings = { | ||
mac = "aa:b2:93:01:02:61" | ||
memory = 16384 | ||
vcpu = 4 | ||
data_pool = "ssd" | ||
} | ||
|
||
server_mounted_mirror = "minima-mirror-ci-bv.mgr.suse.de" | ||
repository_disk_size = 1500 | ||
|
||
auto_accept = false | ||
monitored = true | ||
disable_firewall = false | ||
allow_postgres_connections = false | ||
skip_changelog_import = false | ||
create_first_user = false | ||
mgr_sync_autologin = false | ||
create_sample_channel = false | ||
create_sample_activation_key = false | ||
create_sample_bootstrap_script = false | ||
publish_private_ssl_key = false | ||
use_os_released_updates = true | ||
disable_download_tokens = false | ||
ssh_key_path = "./salt/controller/id_rsa.pub" | ||
from_email = "root@suse.de" | ||
accept_all_ssl_protocols = true | ||
|
||
//server_additional_repos | ||
|
||
} | ||
|
||
module "proxy" { | ||
source = "./modules/proxy" | ||
base_configuration = module.base.configuration | ||
name = "proxy" | ||
provider_settings = { | ||
mac = "aa:b2:93:01:02:62" | ||
memory = 4096 | ||
} | ||
server_configuration = { | ||
hostname = "suma-su-43-server.mgr.suse.de" | ||
username = "admin" | ||
password = "admin" | ||
} | ||
|
||
auto_register = false | ||
auto_connect_to_master = false | ||
download_private_ssl_key = false | ||
install_proxy_pattern = false | ||
auto_configure = false | ||
generate_bootstrap_script = false | ||
publish_private_ssl_key = false | ||
use_os_released_updates = true | ||
ssh_key_path = "./salt/controller/id_rsa.pub" | ||
|
||
} | ||
|
||
module "sles15sp4_minion" { | ||
source = "./modules/minion" | ||
base_configuration = module.base.configuration | ||
name = "sles15sp4-minion" | ||
image = "sles15sp4o" | ||
provider_settings = { | ||
mac = "aa:b2:93:01:02:63" | ||
vcpu = 2 | ||
memory = 2048 | ||
} | ||
|
||
auto_connect_to_master = false | ||
use_os_released_updates = false | ||
ssh_key_path = "./salt/controller/id_rsa.pub" | ||
} | ||
|
||
module "controller" { | ||
source = "./modules/controller" | ||
base_configuration = module.base.configuration | ||
name = "controller" | ||
provider_settings = { | ||
mac = "aa:b2:93:01:02:60" | ||
memory = 16384 | ||
vcpu = 8 | ||
} | ||
swap_file_size = null | ||
|
||
// Cucumber repository configuration for the controller | ||
git_username = var.GIT_USER | ||
git_password = var.GIT_PASSWORD | ||
git_repo = var.CUCUMBER_GITREPO | ||
branch = var.CUCUMBER_BRANCH | ||
|
||
server_configuration = module.server.configuration | ||
proxy_configuration = module.proxy.configuration | ||
sle15sp4_minion_configuration = module.sles15sp4_minion.configuration | ||
} | ||
|
||
output "configuration" { | ||
value = { | ||
controller = module.controller.configuration | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.