From c6a87f1397be408c24ea44fe52e88b40edf687c0 Mon Sep 17 00:00:00 2001 From: Maxime Noel Date: Wed, 18 Dec 2024 13:27:28 +1300 Subject: [PATCH] Update aws pipeline with last comments --- .../common/pipeline-build-validation-aws.groovy | 17 ++++++----------- .../manager-5.0-qe-build-validation-AWS | 4 ++-- ...USEManager-5.0-build-validation-paygo-AWS.tf | 13 ++++++++----- terracumber_config/tf_files/local_mirror.tf | 4 +--- 4 files changed, 17 insertions(+), 21 deletions(-) diff --git a/jenkins_pipelines/environments/common/pipeline-build-validation-aws.groovy b/jenkins_pipelines/environments/common/pipeline-build-validation-aws.groovy index 3950dbe4e..051391ae8 100644 --- a/jenkins_pipelines/environments/common/pipeline-build-validation-aws.groovy +++ b/jenkins_pipelines/environments/common/pipeline-build-validation-aws.groovy @@ -214,10 +214,9 @@ def run(params) { // Deploying AWS server using MU repositories sh "echo \"export TF_VAR_CUCUMBER_GITREPO=${params.cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${params.cucumber_ref}; export TF_VAR_MIRROR=${env.mirror_hostname_aws_private}; export TERRAFORM=${params.terraform_bin}; export TERRAFORM_PLUGINS=${params.terraform_bin_plugins}; export TF_VAR_SERVER_AMI=${server_ami}; export TF_VAR_PROXY_AMI=${proxy_ami}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform-aws.log --init --taint '.*(domain|main_disk).*' --runstep provision --custom-repositories ${WORKSPACE}/custom_repositories.json --sumaform-backend aws\"" - retry(count: 1) { - sh "set +x; source /home/jenkins/.credentials set -x; source /home/jenkins/.registration set -x; export TF_VAR_CUCUMBER_GITREPO=${params.cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${params.cucumber_ref}; export TF_VAR_ARCHITECTURE=${params.architecture}; export TF_VAR_MIRROR=${env.mirror_hostname_aws_private}; export TERRAFORM=${params.terraform_bin}; export TERRAFORM_PLUGINS=${params.terraform_bin_plugins}; export TF_VAR_SERVER_AMI=${server_ami}; export TF_VAR_PROXY_AMI=${proxy_ami}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform-aws.log --init --taint '.*(domain|main_disk).*' --custom-repositories ${WORKSPACE}/custom_repositories.json --use-tf-resource-cleaner --tf-resources-to-keep ${params.minions_to_run.split(', ').join(' ')} --runstep provision --sumaform-backend aws" - deployed = true - } + sh "set +x; source /home/jenkins/.credentials set -x; source /home/jenkins/.registration set -x; export TF_VAR_CUCUMBER_GITREPO=${params.cucumber_gitrepo}; export TF_VAR_CUCUMBER_BRANCH=${params.cucumber_ref}; export TF_VAR_ARCHITECTURE=${params.architecture}; export TF_VAR_MIRROR=${env.mirror_hostname_aws_private}; export TERRAFORM=${params.terraform_bin}; export TERRAFORM_PLUGINS=${params.terraform_bin_plugins}; export TF_VAR_SERVER_AMI=${server_ami}; export TF_VAR_PROXY_AMI=${proxy_ami}; ./terracumber-cli ${common_params} --logfile ${resultdirbuild}/sumaform-aws.log --init --taint '.*(domain|main_disk).*' --custom-repositories ${WORKSPACE}/custom_repositories.json --use-tf-resource-cleaner --tf-resources-to-keep ${params.minions_to_run.split(', ').join(' ')} --runstep provision --sumaform-backend aws" + deployed = true + } } @@ -230,10 +229,6 @@ def run(params) { } } -// stage('Sanity check') { -// sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; ${env.exports} rake cucumber:build_validation_sanity_check'" -// } - stage('Run core features') { if (params.must_run_core && (deployed || !params.must_deploy)) { sh "./terracumber-cli ${common_params} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd '${env.exports} cd /root/spacewalk/testsuite; rake cucumber:build_validation_core'" @@ -403,7 +398,7 @@ def run(params) { println('ERROR: one or more migrations have failed') products_and_salt_migration_stage_result_fail = true } - /** Products and Salt migration stages end **/ + /** Products and Salt migration stages end **/ /** Retail stages begin **/ try { @@ -428,7 +423,7 @@ def run(params) { error("Run retail failed") } } - } + } } catch (Exception ex) { println("ERROR: Retail testing fail.\\nException: ${ex}") retail_stage_result_fail = true @@ -592,7 +587,7 @@ def clientTestingStages(capybara_timeout, default_timeout, minion_type = 'defaul } } stage("Add Activation Keys ${node}") { - // skip this stage for Salt migration minion + // skip this stage for Salt migration minion if (params.must_add_keys && !node.contains('salt_migration_minion')) { if (params.confirm_before_continue) { input 'Press any key to start adding activation keys' diff --git a/jenkins_pipelines/environments/manager-5.0-qe-build-validation-AWS b/jenkins_pipelines/environments/manager-5.0-qe-build-validation-AWS index aeea0507f..6e5fe5f0c 100644 --- a/jenkins_pipelines/environments/manager-5.0-qe-build-validation-AWS +++ b/jenkins_pipelines/environments/manager-5.0-qe-build-validation-AWS @@ -3,8 +3,8 @@ node('sumaform-cucumber') { def minionList = 'sles12sp5_minion, sles12sp5_sshminion, sles12sp5_paygo_minion, ' + 'sles15sp4_minion, sles15sp4_sshminion, ' + - 'sles15sp5_minion, sles15sp5_paygo_minion, ' + - 'sles15sp6_minion, sles15sp6_paygo_minion' + 'sles15sp5_minion, sles15sp5_sshminion, sles15sp5_paygo_minion, ' + + 'sles15sp6_minion, sles15sp6_sshminion, sles15sp6_paygo_minion' properties([ buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '3')), disableConcurrentBuilds(), diff --git a/terracumber_config/tf_files/SUSEManager-5.0-build-validation-paygo-AWS.tf b/terracumber_config/tf_files/SUSEManager-5.0-build-validation-paygo-AWS.tf index 6b55cac16..c467aa1aa 100644 --- a/terracumber_config/tf_files/SUSEManager-5.0-build-validation-paygo-AWS.tf +++ b/terracumber_config/tf_files/SUSEManager-5.0-build-validation-paygo-AWS.tf @@ -2,7 +2,7 @@ // Mandatory variables for terracumber variable "URL_PREFIX" { type = string - default = "https://ci.suse.de/view/Manager/view/Manager-43/job/SUSEManager-432-AWS" + default = "https://ci.suse.de/view/Manager/view/Manager-5.0/job/manager-5.0-qe-build-validation-paygo-aws/" } // Not really used as this is for --runall parameter, and we run cucumber step by step @@ -13,12 +13,12 @@ variable "CUCUMBER_COMMAND" { variable "CUCUMBER_GITREPO" { type = string - default = "https://github.com/uyuni-project/uyuni.git" + default = "https://github.com/SUSE/spacewalk.git" } variable "CUCUMBER_BRANCH" { type = string - default = "master" + default = "Manager-5.0" } variable "CUCUMBER_RESULTS" { @@ -28,7 +28,7 @@ variable "CUCUMBER_RESULTS" { variable "MAIL_SUBJECT" { type = string - default = "Results Manager4.3-WS-MU $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" + default = "Results Manager5.0-AWS-BV $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)" } variable "MAIL_TEMPLATE" { @@ -38,7 +38,7 @@ variable "MAIL_TEMPLATE" { variable "MAIL_SUBJECT_ENV_FAIL" { type = string - default = "Results Manager4.3-AWS-MU: Environment setup failed" + default = "Results Manager5.0-AWS-BV: Environment setup failed" } variable "MAIL_TEMPLATE_ENV_FAIL" { @@ -468,7 +468,10 @@ module "controller" { sle15sp4_sshminion_configuration = module.sles15sp4_sshminion.configuration sle15sp5_minion_configuration = module.sles15sp5_minion.configuration + sle15sp5_sshminion_configuration = module.sles15sp5_sshminion.configuration + sle15sp6_minion_configuration = module.sles15sp6_minion.configuration + sle15sp6_sshminion_configuration = module.sles15sp6_sshminion.configuration } output "bastion_public_name" { diff --git a/terracumber_config/tf_files/local_mirror.tf b/terracumber_config/tf_files/local_mirror.tf index e8ce663cb..dc69cba70 100644 --- a/terracumber_config/tf_files/local_mirror.tf +++ b/terracumber_config/tf_files/local_mirror.tf @@ -97,7 +97,7 @@ provider "libvirt" { } locals { - pool = "mnoel_disks" + pool = "ssd" } module "base" { @@ -126,8 +126,6 @@ module "mirror" { image = "opensuse155o" volume_provider_settings = { pool = local.pool - // uncomment next line to use existing snapshot as starting point - // volume_snapshot_id = data.aws_ebs_snapshot.data_disk_snapshot.id } provider_settings = { mac = "52:54:00:ba:b7:98"