Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 1 | /** |
| 2 | * |
| 3 | * Deploy the product cluster using Jenkins master on CICD cluster |
| 4 | * |
| 5 | * Expected parameters: |
| 6 | |
| 7 | * ENV_NAME Fuel-devops environment name |
| 8 | * MCP_VERSION MCP version, like 2018.4 or proposed |
| 9 | * PASSED_STEPS Steps passed to install components using Jenkins on CICD cluster: "salt,core,cicd,openstack:3200,stacklight:2400", |
| 10 | where 3200 and 2400 might be timeouts (not used in the testing pipeline) |
| 11 | * PARENT_NODE_NAME Name of the jenkins slave to create the environment |
| 12 | * PARENT_WORKSPACE Path to the workspace of the parent job to use tcp-qa repo |
Tatyana Leontovich | f371844 | 2018-10-31 13:36:13 +0200 | [diff] [blame] | 13 | * TEMPEST_TEST_SUITE_NAME Name of tempest suite |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 14 | * TCP_QA_REFS Reference to the tcp-qa change on review.gerrithub.io, like refs/changes/46/418546/41 |
| 15 | */ |
| 16 | |
| 17 | @Library('tcp-qa')_ |
| 18 | |
| 19 | def common = new com.mirantis.mk.Common() |
| 20 | def shared = new com.mirantis.system_qa.SharedPipeline() |
| 21 | def stacks = shared.get_steps_list(PASSED_STEPS) |
| 22 | |
| 23 | if (! env.PARENT_NODE_NAME) { |
| 24 | error "'PARENT_NODE_NAME' must be set from the parent deployment job!" |
| 25 | } |
| 26 | |
| 27 | currentBuild.description = "${PARENT_NODE_NAME}:${ENV_NAME}" |
| 28 | |
Dennis Dmitriev | 1f08b0c | 2019-05-27 17:03:53 +0300 | [diff] [blame] | 29 | timeout(time: 2, unit: 'HOURS') { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 30 | node ("${PARENT_NODE_NAME}") { |
| 31 | if (! fileExists("${PARENT_WORKSPACE}")) { |
| 32 | error "'PARENT_WORKSPACE' contains path to non-existing directory ${PARENT_WORKSPACE} on the node '${PARENT_NODE_NAME}'." |
| 33 | } |
| 34 | dir("${PARENT_WORKSPACE}") { |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 35 | def description = '' |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 36 | def exception_message = '' |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 37 | try { |
Dennis Dmitriev | eb50ce1 | 2018-09-27 13:34:32 +0300 | [diff] [blame] | 38 | |
| 39 | if (env.TCP_QA_REFS) { |
| 40 | stage("Update working dir to patch ${TCP_QA_REFS}") { |
| 41 | shared.update_working_dir() |
| 42 | } |
| 43 | } |
| 44 | |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 45 | def report_name = '' |
| 46 | def testSuiteName = '' |
| 47 | def methodname = '' |
| 48 | def testrail_name_template = '' |
| 49 | def reporter_extra_options = [] |
| 50 | |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 51 | def report_url = '' |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 52 | |
Dennis Dmitriev | 09ef69e | 2018-11-09 15:25:18 +0200 | [diff] [blame] | 53 | // deployment_report_name = "deployment_${ENV_NAME}.xml" |
Dennis Dmitriev | ec7ae97 | 2019-02-19 12:29:11 +0200 | [diff] [blame] | 54 | def deployment_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"deployment_${ENV_NAME}.xml\" -printf \"'%p'\" ", returnStdout: true).trim() |
Dennis Dmitriev | 09ef69e | 2018-11-09 15:25:18 +0200 | [diff] [blame] | 55 | // tcpqa_report_name =~ "nosetests.xml" |
Dennis Dmitriev | ec7ae97 | 2019-02-19 12:29:11 +0200 | [diff] [blame] | 56 | def tcpqa_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"nosetests.xml\" -printf \"'%p'\" ", returnStdout: true).trim() |
Dennis Dmitriev | 09ef69e | 2018-11-09 15:25:18 +0200 | [diff] [blame] | 57 | // tempest_report_name =~ "report_*.xml" |
Dennis Dmitriev | ec7ae97 | 2019-02-19 12:29:11 +0200 | [diff] [blame] | 58 | def tempest_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"report_*.xml\" -printf \"'%p'\" ", returnStdout: true).trim() |
Dennis Dmitriev | 09ef69e | 2018-11-09 15:25:18 +0200 | [diff] [blame] | 59 | // k8s_conformance_report_name =~ conformance_result.xml |
Dennis Dmitriev | ec7ae97 | 2019-02-19 12:29:11 +0200 | [diff] [blame] | 60 | def k8s_conformance_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"conformance_result.xml\" -printf \"'%p'\" ", returnStdout: true).trim() |
Dennis Dmitriev | 34fd300 | 2018-11-15 18:25:16 +0200 | [diff] [blame] | 61 | // k8s_conformance_report_name =~ conformance_virtlet_result.xml |
Dennis Dmitriev | ec7ae97 | 2019-02-19 12:29:11 +0200 | [diff] [blame] | 62 | def k8s_conformance_virtlet_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"conformance_virtlet_result.xml\" -printf \"'%p'\" ", returnStdout: true).trim() |
Dennis Dmitriev | 09ef69e | 2018-11-09 15:25:18 +0200 | [diff] [blame] | 63 | // stacklight_report_name =~ "stacklight_report.xml" or "report.xml" |
Dennis Dmitriev | ec7ae97 | 2019-02-19 12:29:11 +0200 | [diff] [blame] | 64 | def stacklight_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"*report.xml\"", returnStdout: true).trim() |
Dennis Dmitriev | 8565c34 | 2019-02-11 23:45:03 +0200 | [diff] [blame] | 65 | // cvp_sanity_report_name =~ cvp_sanity_report.xml |
Dennis Dmitriev | ec7ae97 | 2019-02-19 12:29:11 +0200 | [diff] [blame] | 66 | def cvp_sanity_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"cvp_sanity_results.xml\" -printf \"'%p'\" ", returnStdout: true).trim() |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 67 | common.printMsg(deployment_report_name ? "Found deployment report: ${deployment_report_name}" : "Deployment report not found", deployment_report_name ? "blue" : "red") |
| 68 | common.printMsg(tcpqa_report_name ? "Found tcp-qa report: ${tcpqa_report_name}" : "tcp-qa report not found", tcpqa_report_name ? "blue" : "red") |
| 69 | common.printMsg(tempest_report_name ? "Found tempest report: ${tempest_report_name}" : "tempest report not found", tempest_report_name ? "blue" : "red") |
| 70 | common.printMsg(k8s_conformance_report_name ? "Found k8s conformance report: ${k8s_conformance_report_name}" : "k8s conformance report not found", k8s_conformance_report_name ? "blue" : "red") |
Dennis Dmitriev | 34fd300 | 2018-11-15 18:25:16 +0200 | [diff] [blame] | 71 | common.printMsg(k8s_conformance_virtlet_report_name ? "Found k8s conformance virtlet report: ${k8s_conformance_virtlet_report_name}" : "k8s conformance virtlet report not found", k8s_conformance_virtlet_report_name ? "blue" : "red") |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 72 | common.printMsg(stacklight_report_name ? "Found stacklight-pytest report: ${stacklight_report_name}" : "stacklight-pytest report not found", stacklight_report_name ? "blue" : "red") |
Dennis Dmitriev | 8565c34 | 2019-02-11 23:45:03 +0200 | [diff] [blame] | 73 | common.printMsg(cvp_sanity_report_name ? "Found CVP Sanity report: ${cvp_sanity_report_name}" : "CVP Sanity report not found", cvp_sanity_report_name ? "blue" : "red") |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 74 | |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 75 | |
| 76 | if (deployment_report_name) { |
| 77 | stage("Deployment report") { |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 78 | testSuiteName = "[MCP] Integration automation" |
| 79 | methodname = '{methodname}' |
| 80 | testrail_name_template = '{title}' |
| 81 | reporter_extra_options = [ |
| 82 | "--testrail-add-missing-cases", |
| 83 | "--testrail-case-custom-fields {\\\"custom_qa_team\\\":\\\"9\\\"}", |
| 84 | "--testrail-case-section-name \'All\'", |
Ekaterina Chernova | ce11341 | 2019-10-15 15:53:30 +0300 | [diff] [blame] | 85 | "--testrail_configuration_name \'tcp-qa\'", |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 86 | ] |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 87 | ret = shared.upload_results_to_testrail(deployment_report_name, testSuiteName, methodname, testrail_name_template, reporter_extra_options) |
| 88 | common.printMsg(ret.stdout, "blue") |
| 89 | report_url = ret.stdout.split("\n").each { |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 90 | if (it.contains("[TestRun URL]")) { |
| 91 | common.printMsg("Found report URL: " + it.trim().split().last(), "blue") |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 92 | description += "<a href=" + it.trim().split().last() + ">${testSuiteName}</a><br>" |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 93 | } |
| 94 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 95 | exception_message += ret.exception |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 96 | } |
| 97 | } |
| 98 | |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 99 | if (tcpqa_report_name) { |
| 100 | stage("tcp-qa cases report") { |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 101 | testSuiteName = "[MCP_X] integration cases" |
| 102 | methodname = "{methodname}" |
| 103 | testrail_name_template = "{title}" |
| 104 | reporter_extra_options = [ |
| 105 | "--testrail-add-missing-cases", |
| 106 | "--testrail-case-custom-fields {\\\"custom_qa_team\\\":\\\"9\\\"}", |
| 107 | "--testrail-case-section-name \'All\'", |
Ekaterina Chernova | 26d8523 | 2019-10-25 12:35:15 +0300 | [diff] [blame^] | 108 | "--testrail_configuration_name \'tcp-qa\'", |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 109 | ] |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 110 | ret = shared.upload_results_to_testrail(tcpqa_report_name, testSuiteName, methodname, testrail_name_template, reporter_extra_options) |
| 111 | common.printMsg(ret.stdout, "blue") |
| 112 | report_url = ret.stdout.split("\n").each { |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 113 | if (it.contains("[TestRun URL]")) { |
| 114 | common.printMsg("Found report URL: " + it.trim().split().last(), "blue") |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 115 | description += "<a href=" + it.trim().split().last() + ">${testSuiteName}</a><br>" |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 116 | } |
| 117 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 118 | exception_message += ret.exception |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 119 | } |
| 120 | } |
| 121 | |
| 122 | if ('openstack' in stacks && tempest_report_name) { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 123 | stage("Tempest report") { |
Tatyana Leontovich | f371844 | 2018-10-31 13:36:13 +0200 | [diff] [blame] | 124 | testSuiteName = env.TEMPEST_TEST_SUITE_NAME |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 125 | methodname = "{classname}.{methodname}" |
| 126 | testrail_name_template = "{title}" |
Ekaterina Chernova | 26d8523 | 2019-10-25 12:35:15 +0300 | [diff] [blame^] | 127 | reporter_extra_options = [ |
| 128 | "--send-duplicates", |
| 129 | "--testrail-add-missing-cases", |
| 130 | "--testrail_configuration_name \'tcp-qa\'", |
| 131 | ] |
| 132 | ret = shared.upload_results_to_testrail(tempest_report_name, |
| 133 | testSuiteName, |
| 134 | methodname, |
| 135 | testrail_name_template, |
| 136 | reporter_extra_options) |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 137 | common.printMsg(ret.stdout, "blue") |
| 138 | report_url = ret.stdout.split("\n").each { |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 139 | if (it.contains("[TestRun URL]")) { |
| 140 | common.printMsg("Found report URL: " + it.trim().split().last(), "blue") |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 141 | description += "<a href=" + it.trim().split().last() + ">${testSuiteName}</a><br>" |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 142 | } |
| 143 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 144 | exception_message += ret.exception |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 145 | } |
| 146 | } |
| 147 | |
| 148 | if ('k8s' in stacks && k8s_conformance_report_name) { |
| 149 | stage("K8s conformance report") { |
Dennis Dmitriev | 265a1c7 | 2018-09-29 05:08:47 +0300 | [diff] [blame] | 150 | def k8s_version=shared.run_cmd_stdout("""\ |
Dennis Dmitriev | cf866e7 | 2018-10-09 17:51:43 +0300 | [diff] [blame] | 151 | . ./env_k8s_version; |
| 152 | echo "\$KUBE_SERVER_VERSION" |
Dennis Dmitriev | eb50ce1 | 2018-09-27 13:34:32 +0300 | [diff] [blame] | 153 | """).trim().split().last() |
| 154 | testSuiteName = "[MCP][k8s]Hyperkube ${k8s_version}.x" |
| 155 | methodname = "{methodname}" |
| 156 | testrail_name_template = "{title}" |
| 157 | reporter_extra_options = [ |
Dennis Dmitriev | 74d7e75 | 2018-10-01 17:37:49 +0300 | [diff] [blame] | 158 | "--send-duplicates", |
Dennis Dmitriev | eb50ce1 | 2018-09-27 13:34:32 +0300 | [diff] [blame] | 159 | "--testrail-add-missing-cases", |
| 160 | "--testrail-case-custom-fields {\\\"custom_qa_team\\\":\\\"9\\\"}", |
| 161 | "--testrail-case-section-name \'Conformance\'", |
| 162 | ] |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 163 | ret = shared.upload_results_to_testrail(k8s_conformance_report_name, testSuiteName, methodname, testrail_name_template, reporter_extra_options) |
| 164 | common.printMsg(ret.stdout, "blue") |
| 165 | report_url = ret.stdout.split("\n").each { |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 166 | if (it.contains("[TestRun URL]")) { |
| 167 | common.printMsg("Found report URL: " + it.trim().split().last(), "blue") |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 168 | description += "<a href=" + it.trim().split().last() + ">${testSuiteName}</a><br>" |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 169 | } |
| 170 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 171 | exception_message += ret.exception |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 172 | } |
| 173 | } |
| 174 | |
Dennis Dmitriev | 34fd300 | 2018-11-15 18:25:16 +0200 | [diff] [blame] | 175 | if ('k8s' in stacks && k8s_conformance_virtlet_report_name) { |
| 176 | stage("K8s conformance virtlet report") { |
| 177 | testSuiteName = "[k8s] Virtlet" |
| 178 | methodname = "{methodname}" |
| 179 | testrail_name_template = "{title}" |
| 180 | reporter_extra_options = [ |
| 181 | "--send-duplicates", |
| 182 | "--testrail-add-missing-cases", |
| 183 | "--testrail-case-custom-fields {\\\"custom_qa_team\\\":\\\"9\\\"}", |
| 184 | "--testrail-case-section-name \'Conformance\'", |
| 185 | ] |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 186 | ret = shared.upload_results_to_testrail(k8s_conformance_virtlet_report_name, testSuiteName, methodname, testrail_name_template, reporter_extra_options) |
| 187 | common.printMsg(ret.stdout, "blue") |
| 188 | report_url = ret.stdout.split("\n").each { |
Dennis Dmitriev | 34fd300 | 2018-11-15 18:25:16 +0200 | [diff] [blame] | 189 | if (it.contains("[TestRun URL]")) { |
| 190 | common.printMsg("Found report URL: " + it.trim().split().last(), "blue") |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 191 | description += "<a href=" + it.trim().split().last() + ">${testSuiteName}</a><br>" |
Dennis Dmitriev | 34fd300 | 2018-11-15 18:25:16 +0200 | [diff] [blame] | 192 | } |
| 193 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 194 | exception_message += ret.exception |
Dennis Dmitriev | 34fd300 | 2018-11-15 18:25:16 +0200 | [diff] [blame] | 195 | } |
| 196 | } |
| 197 | |
Dennis Dmitriev | ee5ef23 | 2018-08-31 13:53:18 +0300 | [diff] [blame] | 198 | if ('stacklight' in stacks && stacklight_report_name) { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 199 | stage("stacklight-pytest report") { |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 200 | testSuiteName = "LMA2.0_Automated" |
| 201 | methodname = "{methodname}" |
| 202 | testrail_name_template = "{title}" |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 203 | ret = shared.upload_results_to_testrail(stacklight_report_name, testSuiteName, methodname, testrail_name_template) |
| 204 | common.printMsg(ret.stdout, "blue") |
| 205 | report_url = ret.stdout.split("\n").each { |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 206 | if (it.contains("[TestRun URL]")) { |
| 207 | common.printMsg("Found report URL: " + it.trim().split().last(), "blue") |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 208 | description += "<a href=" + it.trim().split().last() + ">${testSuiteName}</a><br>" |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 209 | } |
| 210 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 211 | exception_message += ret.exception |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 212 | } |
| 213 | } |
| 214 | |
Dennis Dmitriev | 8565c34 | 2019-02-11 23:45:03 +0200 | [diff] [blame] | 215 | if ('cicd' in stacks && cvp_sanity_report_name) { |
| 216 | stage("CVP Sanity report") { |
| 217 | testSuiteName = "[MCP] cvp sanity" |
| 218 | methodname = '{methodname}' |
| 219 | testrail_name_template = '{title}' |
| 220 | reporter_extra_options = [ |
| 221 | "--send-duplicates", |
| 222 | "--testrail-add-missing-cases", |
| 223 | "--testrail-case-custom-fields {\\\"custom_qa_team\\\":\\\"9\\\"}", |
| 224 | "--testrail-case-section-name \'All\'", |
Ekaterina Chernova | 26d8523 | 2019-10-25 12:35:15 +0300 | [diff] [blame^] | 225 | "--testrail_configuration_name \'tcp-qa\'", |
Dennis Dmitriev | 8565c34 | 2019-02-11 23:45:03 +0200 | [diff] [blame] | 226 | ] |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 227 | ret = shared.upload_results_to_testrail(cvp_sanity_report_name, testSuiteName, methodname, testrail_name_template, reporter_extra_options) |
| 228 | common.printMsg(ret.stdout, "blue") |
| 229 | report_url = ret.stdout.split("\n").each { |
Dennis Dmitriev | 8565c34 | 2019-02-11 23:45:03 +0200 | [diff] [blame] | 230 | if (it.contains("[TestRun URL]")) { |
| 231 | common.printMsg("Found report URL: " + it.trim().split().last(), "blue") |
Dennis Dmitriev | 2700732 | 2019-05-03 19:21:44 +0300 | [diff] [blame] | 232 | description += "<a href=" + it.trim().split().last() + ">${testSuiteName}</a><br>" |
Dennis Dmitriev | 8565c34 | 2019-02-11 23:45:03 +0200 | [diff] [blame] | 233 | } |
| 234 | } |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 235 | exception_message += ret.exception |
Dennis Dmitriev | 8565c34 | 2019-02-11 23:45:03 +0200 | [diff] [blame] | 236 | } |
| 237 | } |
| 238 | |
Dennis Dmitriev | fd0b78c | 2019-05-30 00:16:04 +0300 | [diff] [blame] | 239 | // Check if there were any exceptions during reporting |
| 240 | if (exception_message) { |
| 241 | throw new Exception(exception_message) |
| 242 | } |
| 243 | |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 244 | } catch (e) { |
Dennis Dmitriev | b08c077 | 2018-10-17 15:10:26 +0300 | [diff] [blame] | 245 | common.printMsg("Job is failed", "purple") |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 246 | throw e |
| 247 | } finally { |
| 248 | // reporting is failed for some reason |
Dennis Dmitriev | fbf4227 | 2018-10-23 00:19:50 +0300 | [diff] [blame] | 249 | writeFile(file: "description.txt", text: description, encoding: "UTF-8") |
Dennis Dmitriev | e4b831b | 2018-08-15 17:16:10 +0300 | [diff] [blame] | 250 | } |
| 251 | } |
| 252 | } |
Dennis Dmitriev | 1f08b0c | 2019-05-27 17:03:53 +0300 | [diff] [blame] | 253 | } // timeout |