Hanna Arhipova | 31cb1d8 | 2021-01-27 09:41:11 +0200 | [diff] [blame] | 1 | /* |
| 2 | * DEPLOY_EMPTY_NODE Add extra node to heat stack. Node without a role and with salt-minion |
| 3 | */ |
| 4 | |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 5 | @Library('tcp-qa')_ |
| 6 | |
| 7 | def common = new com.mirantis.mk.Common() |
| 8 | def shared = new com.mirantis.system_qa.SharedPipeline() |
| 9 | def steps = "hardware,create_model,salt," + env.DRIVETRAIN_STACK_INSTALL + "," + env.PLATFORM_STACK_INSTALL |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 10 | def env_manager = env.ENV_MANAGER ?: 'devops' |
Hanna Arhipova | 6f49352 | 2019-12-25 04:23:28 +0200 | [diff] [blame] | 11 | def batch_size = env.BATCH_SIZE ?: '' |
Dmitriy Kruglov | 28b68d6 | 2020-02-12 02:27:25 +0100 | [diff] [blame] | 12 | def dist_upgrade_nodes = "${env.DIST_UPGRADE_NODES}" != "false" ? true : false |
PGlazov | ed19b35 | 2020-05-21 16:42:27 +0400 | [diff] [blame] | 13 | def upgrade_saltstack = "${env.UPGRADE_SALTSTACK}" != "false" ? true : false |
Pavel Glazov | 40cfda3 | 2023-03-22 02:54:47 +0400 | [diff] [blame] | 14 | def upgrade_version_tag = "${env.UPGRADE_VERSION_TAG}" |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 15 | |
| 16 | if (env_manager == 'devops') { |
| 17 | jenkins_slave_node_name = "${NODE_NAME}" |
Tatyana Leontovich | c18c814 | 2019-05-16 15:20:33 +0300 | [diff] [blame] | 18 | node_with_reports = "${NODE_NAME}" |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 19 | make_snapshot_stages = "${env.MAKE_SNAPSHOT_STAGES}" != "false" ? true : false |
| 20 | } else if (env_manager == 'heat') { |
Anna Arhipova | 76b1f93 | 2022-08-05 10:07:32 +0200 | [diff] [blame] | 21 | jenkins_slave_node_name = "openstack_slave_${env.ENV_NAME}" |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 22 | make_snapshot_stages = false |
Tatyana Leontovich | c18c814 | 2019-05-16 15:20:33 +0300 | [diff] [blame] | 23 | node_with_reports = jenkins_slave_node_name |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 24 | } |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 25 | |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 26 | currentBuild.description = "${NODE_NAME}:${ENV_NAME}<br>" |
Dennis Dmitriev | 201a35e | 2018-08-06 01:37:05 +0300 | [diff] [blame] | 27 | |
PGlazov | ed19b35 | 2020-05-21 16:42:27 +0400 | [diff] [blame] | 28 | def deploy(shared, common, steps, env_manager, batch_size, dist_upgrade_nodes, upgrade_saltstack) { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 29 | def report_text = '' |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 30 | try { |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 31 | |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 32 | stage("Clean the environment and clone tcp-qa") { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 33 | shared.prepare_working_dir(env_manager) |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 34 | } |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 35 | |
Hanna Arhipova | 50bd772 | 2021-05-14 14:13:46 +0300 | [diff] [blame] | 36 | if (env.IPMI_CREDS) { |
| 37 | withCredentials([ |
| 38 | [$class : 'UsernamePasswordMultiBinding', |
| 39 | credentialsId : "${IPMI_CREDS}", |
| 40 | passwordVariable: 'IPMI_PASS', |
| 41 | usernameVariable: 'IPMI_USER'] |
| 42 | ]) { |
| 43 | env.IPMI_PASS = IPMI_PASS |
| 44 | env.IPMI_USER = IPMI_USER |
| 45 | shared.reboot_hardware_nodes("${IPMI_CREDS}") |
| 46 | } |
| 47 | } |
| 48 | |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 49 | stage("Create environment, generate model, bootstrap the salt-cluster") { |
| 50 | // steps: "hardware,create_model,salt" |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 51 | if (env_manager == 'devops') { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 52 | shared.swarm_bootstrap_salt_cluster_devops() |
| 53 | } else if (env_manager == 'heat') { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 54 | // If shared.swarm_bootstrap_salt_cluster_heat() failed, |
| 55 | // do not schedule shared.swarm_testrail_report() on the non existing Jenkins slave |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 56 | shared.swarm_bootstrap_salt_cluster_heat(jenkins_slave_node_name) |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 57 | // When the Heat stack created, set jenkins_slave_node_name to the new Jenkins slave |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 58 | // disable dos.py snapshots for 'heat' manager |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 59 | } else { |
| 60 | throw new Exception("Unknow env_manager: '${env_manager}'") |
| 61 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 62 | |
| 63 | if (fileExists("jenkins_agent_description.txt")) { |
| 64 | def String jenkins_agent_description = readFile("jenkins_agent_description.txt") |
| 65 | currentBuild.description += "${jenkins_agent_description}" |
| 66 | } |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 67 | } |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 68 | |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 69 | stage("Install core infrastructure and deploy CICD nodes") { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 70 | if (env.DRIVETRAIN_STACK_INSTALL) { |
| 71 | // steps: env.DRIVETRAIN_STACK_INSTALL |
PGlazov | d4b70a0 | 2020-05-26 13:28:59 +0400 | [diff] [blame] | 72 | shared.swarm_deploy_cicd(env.DRIVETRAIN_STACK_INSTALL, env.DRIVETRAIN_STACK_INSTALL_TIMEOUT, jenkins_slave_node_name, make_snapshot_stages, batch_size, dist_upgrade_nodes, upgrade_saltstack) |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 73 | } else { |
| 74 | common.printMsg("DRIVETRAIN_STACK_INSTALL is empty, skipping 'swarm-deploy-cicd' job", "green") |
| 75 | } |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 76 | } |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 77 | |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 78 | stage("Deploy platform components") { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 79 | if (env.PLATFORM_STACK_INSTALL) { |
| 80 | // steps: env.PLATFORM_STACK_INSTALL |
PGlazov | ed19b35 | 2020-05-21 16:42:27 +0400 | [diff] [blame] | 81 | shared.swarm_deploy_platform(env.PLATFORM_STACK_INSTALL, env.PLATFORM_STACK_INSTALL_TIMEOUT, jenkins_slave_node_name, make_snapshot_stages, batch_size, dist_upgrade_nodes, upgrade_saltstack) |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 82 | } else { |
| 83 | common.printMsg("PLATFORM_STACK_INSTALL is empty, skipping 'swarm-deploy-platform' job", "green") |
| 84 | } |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 85 | } |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 86 | |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 87 | currentBuild.result = 'SUCCESS' |
Dennis Dmitriev | fde667f | 2018-07-23 16:26:50 +0300 | [diff] [blame] | 88 | |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 89 | } catch (e) { |
Dennis Dmitriev | b08c077 | 2018-10-17 15:10:26 +0300 | [diff] [blame] | 90 | common.printMsg("Deploy is failed: " + e.message , "purple") |
| 91 | report_text = e.message |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 92 | if (make_snapshot_stages) { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 93 | def snapshot_name = "deploy_failed" |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 94 | shared.run_cmd("""\ |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 95 | dos.py suspend ${ENV_NAME} || true |
| 96 | dos.py snapshot ${ENV_NAME} ${snapshot_name} || true |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 97 | """) |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 98 | if ("${env.SHUTDOWN_ENV_ON_TEARDOWN}" == "false") { |
| 99 | shared.run_cmd("""\ |
| 100 | dos.py resume ${ENV_NAME} || true |
| 101 | """) |
| 102 | } |
| 103 | shared.devops_snapshot_info(snapshot_name) |
Dennis Dmitriev | 6f8b0d0 | 2018-07-30 21:27:08 +0300 | [diff] [blame] | 104 | } |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 105 | throw e |
| 106 | } finally { |
| 107 | shared.create_deploy_result_report(steps, currentBuild.result, report_text) |
| 108 | } |
| 109 | } |
| 110 | |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 111 | def test(shared, common, steps, env_manager) { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 112 | try { |
| 113 | stage("Run tests") { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 114 | if (env.RUN_TEST_OPTS) { |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 115 | shared.swarm_run_pytest(steps, jenkins_slave_node_name, make_snapshot_stages) |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 116 | } else { |
| 117 | common.printMsg("RUN_TEST_OPTS is empty, skipping 'swarm-run-pytest' job", "green") |
| 118 | } |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | } catch (e) { |
Dennis Dmitriev | b08c077 | 2018-10-17 15:10:26 +0300 | [diff] [blame] | 122 | common.printMsg("Tests are failed: " + e.message, "purple") |
Dennis Dmitriev | 0244741 | 2019-04-17 18:02:46 +0300 | [diff] [blame] | 123 | if (make_snapshot_stages) { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 124 | def snapshot_name = "tests_failed" |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 125 | shared.run_cmd("""\ |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 126 | dos.py suspend ${ENV_NAME} || true |
| 127 | dos.py snapshot ${ENV_NAME} ${snapshot_name} || true |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 128 | """) |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 129 | if ("${env.SHUTDOWN_ENV_ON_TEARDOWN}" == "false") { |
| 130 | shared.run_cmd("""\ |
| 131 | dos.py resume ${ENV_NAME} || true |
| 132 | """) |
| 133 | } |
| 134 | shared.devops_snapshot_info(snapshot_name) |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 135 | } |
Dennis Dmitriev | b08c077 | 2018-10-17 15:10:26 +0300 | [diff] [blame] | 136 | throw e |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 137 | } |
| 138 | } |
| 139 | |
Dennis Dmitriev | 1f08b0c | 2019-05-27 17:03:53 +0300 | [diff] [blame] | 140 | |
Hanna Arhipova | 0b6df82 | 2020-08-07 21:50:28 +0300 | [diff] [blame] | 141 | timeout(time: 23, unit: 'HOURS') { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 142 | // main |
Tatyana Leontovich | bfbc483 | 2018-12-27 12:47:23 +0200 | [diff] [blame] | 143 | // Temporary disable throttle to check how it will run |
| 144 | //throttle(['fuel_devops_environment']) { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 145 | node ("${NODE_NAME}") { |
Hanna Arhipova | 4d49362 | 2020-02-06 18:14:46 +0200 | [diff] [blame] | 146 | env.slave_workdir = pwd() |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 147 | def extra_vars = EXTRA_VARS ?: '' |
| 148 | if (extra_vars != '') { |
| 149 | extra_vars = extra_vars.split('\n').collect{it as String} |
| 150 | } |
| 151 | else { |
| 152 | extra_vars = [] |
| 153 | } |
| 154 | withEnv(extra_vars) { |
| 155 | try { |
| 156 | // run deploy stages |
| 157 | deploy(shared, common, steps, env_manager, batch_size, dist_upgrade_nodes, upgrade_saltstack) |
| 158 | // run test stages |
| 159 | test(shared, common, steps, env_manager) |
| 160 | } catch (e) { |
| 161 | common.printMsg("Job is failed: " + e.message, "purple") |
| 162 | throw e |
| 163 | } finally { |
| 164 | if (make_snapshot_stages) { |
| 165 | // shutdown the environment if required |
| 166 | if ("${env.SHUTDOWN_ENV_ON_TEARDOWN}" == "true") { |
| 167 | shared.run_cmd("""\ |
| 168 | dos.py destroy ${ENV_NAME} || true |
| 169 | """) |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | stage("Archive all xml reports") { |
| 174 | dir("${env.slave_workdir }") { |
| 175 | archiveArtifacts artifacts: "**/*.xml,**/*.ini,**/*.log,**/*.tar.gz" |
| 176 | } |
| 177 | } |
| 178 | // delete directory with artifacts from swarm-run-pytest pipeline |
| 179 | // for excluding xml duplicates |
| 180 | if (fileExists("tmp")) { |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 181 | shared.run_cmd("""\ |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 182 | rm -rf tmp/ |
Dennis Dmitriev | 4c38347 | 2019-04-12 13:58:06 +0300 | [diff] [blame] | 183 | """) |
| 184 | } |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 185 | |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 186 | if ("${env.REPORT_TO_TESTRAIL}" != "false") { |
| 187 | stage("report results to testrail from jenkins master") { |
| 188 | common.printMsg("Running on: " + node_with_reports, "blue") |
| 189 | common.printMsg("Running on: " + env.NODE_NAME, "blue") |
| 190 | shared.swarm_testrail_report(steps, env.NODE_NAME) |
Hanna Arhipova | 4d49362 | 2020-02-06 18:14:46 +0200 | [diff] [blame] | 191 | } |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 192 | stage("Store TestRail reports to job description") { |
| 193 | if (fileExists("description.txt")) { |
| 194 | def String description = readFile("description.txt") |
| 195 | currentBuild.description += "${description}" |
| 196 | } |
Tatyana Leontovich | 6cce9d6 | 2019-05-24 19:43:07 +0300 | [diff] [blame] | 197 | } |
Vladimir Jigulin | b02dcc5 | 2019-04-02 15:57:53 +0400 | [diff] [blame] | 198 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 199 | |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 200 | if (fileExists("jenkins_agent_description.txt")) { |
| 201 | // if there is a separated foundation node on $jenkins_slave_node_name, |
| 202 | // then archive artifacts also on that node |
| 203 | if (jenkins_slave_node_name != env.NODE_NAME) { |
| 204 | node ("${jenkins_slave_node_name}") { |
| 205 | dir("${env.slave_workdir }") { |
| 206 | stage("Archive all xml reports from node ${jenkins_slave_node_name}") { |
| 207 | archiveArtifacts artifacts: "**/*.xml,**/*.ini,**/*.log,**/*.tar.gz,*.xml,*.ini,*.log,*.tar.gz", allowEmptyArchive: true |
Hanna Arhipova | 4d49362 | 2020-02-06 18:14:46 +0200 | [diff] [blame] | 208 | } |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 209 | if ("${env.REPORT_TO_TESTRAIL}" != "false") { |
| 210 | stage("report results to testrail") { |
| 211 | common.printMsg("Running on: " + node_with_reports, "blue") |
| 212 | shared.swarm_testrail_report(steps, node_with_reports) |
| 213 | } |
| 214 | stage("Store TestRail reports to job description from ${jenkins_slave_node_name}") { |
| 215 | if (fileExists("description.txt")) { |
| 216 | def String description = readFile("description.txt") |
| 217 | currentBuild.description += "${description}" |
| 218 | } |
Hanna Arhipova | 4d49362 | 2020-02-06 18:14:46 +0200 | [diff] [blame] | 219 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 220 | } |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 221 | } //dir |
| 222 | } // node |
| 223 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 224 | } |
Pavel Glazov | af7d199 | 2023-03-23 14:58:01 +0400 | [diff] [blame] | 225 | //run upgrade pike to queens only for pike proposed |
| 226 | if (env.AUTO_UPGRADE_TO_QUEENS == "true" && currentBuild.result == 'SUCCESS') { |
| 227 | def deploy = build job: "os-update-pike-to-queens", |
| 228 | parameters: [ |
| 229 | string(name: 'PARENT_NODE_NAME', value: "openstack_slave_${env.ENV_NAME}"), |
| 230 | string(name: 'TCP_QA_REFS', value: env.TCP_QA_REFS), |
| 231 | string(name: 'PASSED_STEPS', value: steps), |
| 232 | string(name: 'TEMPEST_TEST_SUITE_NAME', value: env.TEMPEST_TEST_SUITE_NAME), |
| 233 | string(name: 'NODE', value: "openstack_slave_${env.ENV_NAME}"), |
| 234 | string(name: 'RUN_TEST_OPTS', value: '-k TestUpdatePikeToQueens') |
| 235 | ], |
| 236 | wait: false, |
| 237 | propagate: false |
| 238 | } |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 239 | //run upgrade env to proposed |
| 240 | if (env.RUN_UPGRADE_AFTER_JOB == "true" && currentBuild.result == 'SUCCESS') { |
| 241 | network_backend = env.PLATFORM_STACK_INSTALL.contains("contrail") ? 'contrail' : 'dvr' |
| 242 | upgrade_job = "mcp-update-${env.TEMPEST_IMAGE_VERSION}-${network_backend}-sl" |
| 243 | upgrade_to_tag = '' |
| 244 | contrail_upgrade_line = '' |
| 245 | if(env.UPGRADE_TO_TAG == "true") { |
Pavel Glazov | 40cfda3 | 2023-03-22 02:54:47 +0400 | [diff] [blame] | 246 | upgrade_to_tag = "--update-to-tag ${upgrade_version_tag} " |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 247 | } |
| 248 | if(env.PLATFORM_STACK_INSTALL.contains("contrail")) { |
| 249 | contrail_upgrade_line = "tcp_tests/tests/system/test_upgrade_contrail.py::TestUpdateContrail " |
| 250 | } |
| 251 | run_test_opts = """--keep-duplicates --maxfail=1 \ |
| 252 | tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_drivetrain ${upgrade_to_tag} \ |
| 253 | ${contrail_upgrade_line}\ |
| 254 | tcp_tests/tests/system/test_mcp_update.py::TestOpenstackUpdate \ |
| 255 | tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_galera --update-mysql-version 5.7 \ |
| 256 | tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_rabbit \ |
| 257 | tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_stacklight \ |
| 258 | tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_ceph \ |
| 259 | \ |
| 260 | tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_tempest \ |
| 261 | tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity \ |
| 262 | tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight |
| 263 | """ |
| 264 | if (env.IPMI_CREDS) { |
Pavel Glazov | b4b7c53 | 2024-05-22 15:13:48 +0400 | [diff] [blame^] | 265 | if (env.ENV_NAME == "released-bm-b300-cicd-queens-ovs-maas") { |
| 266 | upgrade_job = "mcp-update-bm-b300-queens-ovs-maas" |
| 267 | } |
| 268 | if (env.ENV_NAME == "released-bm-cicd-queens-ovs-cl-maas") { |
| 269 | upgrade_job = "mcp-update-bm-queens-ovs-cl-maas" |
| 270 | } |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 271 | } |
| 272 | def deploy = build job: "${upgrade_job}", |
| 273 | parameters: [ |
| 274 | string(name: 'PARENT_NODE_NAME', value: "openstack_slave_${env.ENV_NAME}"), |
| 275 | string(name: 'TCP_QA_REFS', value: env.TCP_QA_REFS), |
| 276 | string(name: 'PASSED_STEPS', value: steps), |
| 277 | string(name: 'TEMPEST_TEST_SUITE_NAME', value: env.TEMPEST_TEST_SUITE_NAME), |
| 278 | string(name: 'NODE', value: "openstack_slave_${env.ENV_NAME}"), |
| 279 | string(name: 'RUN_TEST_OPTS', value: run_test_opts) |
| 280 | ], |
| 281 | wait: false, |
| 282 | propagate: false |
Anna Arhipova | 5d936b8 | 2022-08-05 10:07:32 +0200 | [diff] [blame] | 283 | } |
dtsapikov | 6067989 | 2022-11-16 17:01:16 +0400 | [diff] [blame] | 284 | } // try |
| 285 | } |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 286 | } // node |
| 287 | |
| 288 | |
Dennis Dmitriev | 1f08b0c | 2019-05-27 17:03:53 +0300 | [diff] [blame] | 289 | //} |
| 290 | } // timeout |