diff --git a/jenkins_pipelines/environments/common/pipeline-build-validation-cleanup.groovy b/jenkins_pipelines/environments/common/pipeline-build-validation-cleanup.groovy index 7f23f48f8..d6f321e5e 100644 --- a/jenkins_pipelines/environments/common/pipeline-build-validation-cleanup.groovy +++ b/jenkins_pipelines/environments/common/pipeline-build-validation-cleanup.groovy @@ -167,61 +167,61 @@ def run(params) { export TERRAFORM_PLUGINS=${terraform_bin_plugins} """ - stage('Delete client VMs') { - - // Construct the --tf-resources-to-delete argument dynamically - ArrayList tfResourcesToDelete = [] - if (params.clean_proxy) { - tfResourcesToDelete.add('proxy') - } - if (params.clean_monitoring_server) { - tfResourcesToDelete.add('monitoring-server') - } - if (params.clean_retail) { - tfResourcesToDelete.add('retail') - } - - // Join the resources into a comma-separated string if there are any to delete - String tfResourcesToDeleteArg = defaultResourcesToDelete.isEmpty() ? '' : "--tf-resources-to-delete ${defaultResourcesToDelete.join(' ')}" - - // Execute Terracumber CLI to deploy the environment without clients - sh """ - ${environmentVars} - set +x - ./terracumber-cli ${commonParams} --logfile ${logFile} --init --sumaform-backend ${sumaform_backend} --use-tf-resource-cleaner --init --runstep provision ${tfResourcesToDeleteArg} - """ - } - - stage('Redeploy the environment with new client VMs and update custom repositories into cucumber') { - - // Run Terracumber to deploy the environment - sh """ - ${environmentVars} - set +x - ./terracumber-cli ${commonParams} --logfile ${resultdirbuild}/sumaform.log --init --sumaform-backend ${sumaform_backend} --runstep provision - """ - } - - stage('Copy the new custom repository json file to controller') { - // Generate custom_repositories.json file in the workspace from the value passed by parameter - if (params.custom_repositories?.trim()) { - writeFile file: 'custom_repositories.json', text: params.custom_repositories, encoding: "UTF-8" - } - - // Generate custom_repositories.json file in the workspace using a Python script - MI Identifiers passed by parameter - if (params.mi_ids?.trim()) { - node('manager-jenkins-node') { - checkout scm - res_python_script_ = sh(script: "python3 jenkins_pipelines/scripts/json_generator/maintenance_json_generator.py --mi_ids ${params.mi_ids}", returnStatus: true) - echo "Build Validation JSON script return code:\n ${json_content}" - if (res_python_script != 0) { - error("MI IDs (${params.mi_ids}) passed by parameter are wrong (or already released)") - } - } - } - sh(script: "${SUSEManagerCleanerProgram} --url ${controllerHostname} --product_version ${product_version} --mode update_custom_repositories") - - } +// stage('Delete client VMs') { +// +// // Construct the --tf-resources-to-delete argument dynamically +// ArrayList tfResourcesToDelete = [] +// if (params.clean_proxy) { +// tfResourcesToDelete.add('proxy') +// } +// if (params.clean_monitoring_server) { +// tfResourcesToDelete.add('monitoring-server') +// } +// if (params.clean_retail) { +// tfResourcesToDelete.add('retail') +// } +// +// // Join the resources into a comma-separated string if there are any to delete +// String tfResourcesToDeleteArg = defaultResourcesToDelete.isEmpty() ? '' : "--tf-resources-to-delete ${defaultResourcesToDelete.join(' ')}" +// +// // Execute Terracumber CLI to deploy the environment without clients +// sh """ +// ${environmentVars} +// set +x +// ./terracumber-cli ${commonParams} --logfile ${logFile} --init --sumaform-backend ${sumaform_backend} --use-tf-resource-cleaner --init --runstep provision ${tfResourcesToDeleteArg} +// """ +// } +// +// stage('Redeploy the environment with new client VMs and update custom repositories into cucumber') { +// +// // Run Terracumber to deploy the environment +// sh """ +// ${environmentVars} +// set +x +// ./terracumber-cli ${commonParams} --logfile ${resultdirbuild}/sumaform.log --init --sumaform-backend ${sumaform_backend} --runstep provision +// """ +// } +// +// stage('Copy the new custom repository json file to controller') { +// // Generate custom_repositories.json file in the workspace from the value passed by parameter +// if (params.custom_repositories?.trim()) { +// writeFile file: 'custom_repositories.json', text: params.custom_repositories, encoding: "UTF-8" +// } +// +// // Generate custom_repositories.json file in the workspace using a Python script - MI Identifiers passed by parameter +// if (params.mi_ids?.trim()) { +// node('manager-jenkins-node') { +// checkout scm +// res_python_script_ = sh(script: "python3 jenkins_pipelines/scripts/json_generator/maintenance_json_generator.py --mi_ids ${params.mi_ids}", returnStatus: true) +// echo "Build Validation JSON script return code:\n ${json_content}" +// if (res_python_script != 0) { +// error("MI IDs (${params.mi_ids}) passed by parameter are wrong (or already released)") +// } +// } +// } +// sh(script: "${SUSEManagerCleanerProgram} --url ${controllerHostname} --product_version ${product_version} --mode update_custom_repositories") +// +// } stage('Sanity check') { sh "./terracumber-cli ${commonParams} --logfile ${resultdirbuild}/testsuite.log --runstep cucumber --cucumber-cmd 'cd /root/spacewalk/testsuite; ${exports} rake cucumber:build_validation_sanity_check'"