vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 1 | package com.mirantis.mk |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 2 | |
| 3 | /** |
| 4 | * |
| 5 | * KaaS Component Testing Utilities |
| 6 | * |
| 7 | */ |
| 8 | |
Владислав Наумов | e534581 | 2020-08-12 16:30:20 +0200 | [diff] [blame] | 9 | /** |
| 10 | * Check KaaS Core CICD feature flags |
| 11 | * such triggers can be used in case of switching between pipelines, |
| 12 | * conditions inside pipelines to reduce dependency on jenkins job builder and jenkins job templates itself |
| 13 | * |
| 14 | * @return (map)[ |
| 15 | * ffNameEnabled: (bool) True/False |
| 16 | * ] |
| 17 | */ |
| 18 | def checkCoreCIFeatureFlags() { |
| 19 | def common = new com.mirantis.mk.Common() |
| 20 | def ff = [ |
| 21 | build_artifacts_upgrade: false, |
| 22 | ] |
| 23 | |
| 24 | def commitMsg = env.GERRIT_CHANGE_COMMIT_MESSAGE ? new String(env.GERRIT_CHANGE_COMMIT_MESSAGE.decodeBase64()) : '' |
| 25 | if (commitMsg ==~ /(?s).*\[ci-build-artifacts-upgrade\].*/) { |
| 26 | ff['build_artifacts_upgrade'] = true |
| 27 | } |
| 28 | |
| 29 | common.infoMsg("Core ci feature flags status: ${ff}") |
| 30 | return ff |
| 31 | } |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 32 | |
| 33 | /** |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 34 | * Determine scope of test suite against per-commit KaaS deployment based on keywords |
Владислав Наумов | 5a523ef | 2020-07-29 13:33:38 +0200 | [diff] [blame] | 35 | * Keyword list: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/ |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 36 | * |
| 37 | * Used for components team to combine test-suites and forward desired parameters to kaas/core deployment jobs |
| 38 | * Example scheme: |
Владислав Наумов | e534581 | 2020-08-12 16:30:20 +0200 | [diff] [blame] | 39 | * New CR pushed in kubernetes/lcm-ansible -> parsing it'cs commit body and combine test-suite -> trigger deployment jobs from kaas/core |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 40 | * manage test-suite through Jenkins Job Parameters |
| 41 | * |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 42 | * @return (map)[ |
| 43 | * deployChildEnabled: (bool) True if need to deploy child cluster during demo-run |
| 44 | * runUie2eEnabled: (bool) True if need to run ui-e2e cluster during demo-run |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 45 | * ] |
| 46 | */ |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 47 | def checkDeploymentTestSuite() { |
vnaumov | bdb9022 | 2020-05-04 18:25:50 +0200 | [diff] [blame] | 48 | def common = new com.mirantis.mk.Common() |
| 49 | |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 50 | // Available triggers and its sane defaults |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 51 | def deployChild = env.DEPLOY_CHILD_CLUSTER ? env.DEPLOY_CHILD_CLUSTER.toBoolean() : false |
| 52 | def upgradeChild = env.UPGRADE_CHILD_CLUSTER ? env.UPGRADE_CHILD_CLUSTER.toBoolean() : false |
Владислав Наумов | 0dc9925 | 2020-11-13 13:30:48 +0100 | [diff] [blame^] | 53 | def attachBYO = env.ATTACH_BYO ? env.ATTACH_BYO.toBoolean() : false |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 54 | def upgradeMgmt = env.UPGRADE_MGMT_CLUSTER ? env.UPGRADE_MGMT_CLUSTER.toBoolean() : false |
| 55 | def runUie2e = env.RUN_UI_E2E ? env.RUN_UI_E2E.toBoolean() : false |
| 56 | def runMgmtConformance = env.RUN_MGMT_CFM ? env.RUN_MGMT_CFM.toBoolean() : false |
| 57 | def runChildConformance = env.RUN_CHILD_CFM ? env.RUN_CHILD_CFM.toBoolean() : false |
| 58 | def fetchServiceBinaries = env.FETCH_BINARIES_FROM_UPSTREAM ? env.FETCH_BINARIES_FROM_UPSTREAM.toBoolean() : false |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 59 | // multiregion configuration from env variable: comma-separated string in form $mgmt_provider,$regional_provider |
| 60 | def multiregionalMappings = env.MULTIREGION_SETUP ? multiregionWorkflowParser(env.MULTIREGION_SETUP) : [ |
| 61 | enabled: false, |
| 62 | managementLocation: '', |
| 63 | regionLocation: '', |
| 64 | ] |
Владислав Наумов | 4eb1da3 | 2020-08-31 14:45:16 +0200 | [diff] [blame] | 65 | |
| 66 | // optional demo deployment customization |
Владислав Наумов | 905dd36 | 2020-06-08 16:37:01 +0200 | [diff] [blame] | 67 | def awsOnDemandDemo = env.ALLOW_AWS_ON_DEMAND ? env.ALLOW_AWS_ON_DEMAND.toBoolean() : false |
Ivan Berezovskiy | 07e1de1 | 2020-10-09 13:07:05 +0400 | [diff] [blame] | 68 | def awsOnRhelDemo = false |
Владислав Наумов | 6ec7430 | 2020-11-05 12:38:53 +0100 | [diff] [blame] | 69 | def vsphereOnDemandDemo = env.ALLOW_VSPHERE_ON_DEMAND ? env.ALLOW_VSPHERE_ON_DEMAND.toBoolean() : false |
Владислав Наумов | 4eb1da3 | 2020-08-31 14:45:16 +0200 | [diff] [blame] | 70 | def enableOSDemo = true |
azvyagintsev | 1761bdc | 2020-09-04 17:24:12 +0300 | [diff] [blame] | 71 | def enableBMDemo = true |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 72 | |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 73 | def commitMsg = env.GERRIT_CHANGE_COMMIT_MESSAGE ? new String(env.GERRIT_CHANGE_COMMIT_MESSAGE.decodeBase64()) : '' |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 74 | if (commitMsg ==~ /(?s).*\[child-deploy\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-deploy.*/ || upgradeChild || runChildConformance) { |
| 75 | deployChild = true |
| 76 | } |
| 77 | if (commitMsg ==~ /(?s).*\[child-upgrade\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-upgrade.*/) { |
| 78 | deployChild = true |
| 79 | upgradeChild = true |
| 80 | } |
Владислав Наумов | 0dc9925 | 2020-11-13 13:30:48 +0100 | [diff] [blame^] | 81 | if (commitMsg ==~ /(?s).*\[byo-attach\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*byo-attach.*/) { |
| 82 | attachBYO = true |
| 83 | } |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 84 | if (commitMsg ==~ /(?s).*\[mgmt-upgrade\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*mgmt-upgrade.*/) { |
| 85 | upgradeMgmt = true |
| 86 | } |
| 87 | if (commitMsg ==~ /(?s).*\[ui-e2e\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*ui-e2e.*/) { |
| 88 | runUie2e = true |
| 89 | } |
| 90 | if (commitMsg ==~ /(?s).*\[mgmt-cfm\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*mgmt-cfm.*/) { |
| 91 | runMgmtConformance = true |
| 92 | } |
| 93 | if (commitMsg ==~ /(?s).*\[child-cfm\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-cfm.*/) { |
| 94 | runChildConformance = true |
| 95 | deployChild = true |
| 96 | } |
| 97 | if (commitMsg ==~ /(?s).*\[fetch.*binaries\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*fetch.*binaries.*/) { |
| 98 | fetchServiceBinaries = true |
| 99 | } |
Владислав Наумов | 0dc9925 | 2020-11-13 13:30:48 +0100 | [diff] [blame^] | 100 | if (commitMsg ==~ /(?s).*\[aws-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*aws-demo.*/ || attachBYO) { |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 101 | awsOnDemandDemo = true |
Владислав Наумов | 0dc9925 | 2020-11-13 13:30:48 +0100 | [diff] [blame^] | 102 | if (attachBYO) { |
| 103 | common.warningMsg('Forced running additional kaas deployment with AWS provider, due byo demo scenario trigger: \'[byo-attach]\' ') |
| 104 | } else { |
| 105 | common.warningMsg('Forced running additional kaas deployment with AWS provider, triggered on patchset using custom keyword: \'[aws-demo]\' ') |
| 106 | } |
Владислав Наумов | 4eb1da3 | 2020-08-31 14:45:16 +0200 | [diff] [blame] | 107 | } |
Ivan Berezovskiy | 07e1de1 | 2020-10-09 13:07:05 +0400 | [diff] [blame] | 108 | if (commitMsg ==~ /(?s).*\[aws-rhel-demo\].*/) { |
| 109 | awsOnDemandDemo = false |
| 110 | awsOnRhelDemo = true |
| 111 | common.warningMsg('Forced running additional kaas deployment with AWS provider on RHEL, triggered on patchset using custom keyword: \'[aws-rhel-demo]\'.' + |
| 112 | 'Upgrade scenario for Mgmt or Child cluster is not supported currently in such deployment') |
| 113 | } |
Stanislav Riazanov | 24b9c5d | 2020-10-12 22:27:12 +0400 | [diff] [blame] | 114 | if (commitMsg ==~ /(?s).*\[vsphere-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*vsphere-demo.*/) { |
| 115 | vsphereOnDemandDemo = true |
| 116 | common.warningMsg('Forced running additional kaas deployment with VSPHERE provider, triggered on patchset using custom keyword: \'[vsphere-demo]\' ') |
| 117 | } |
Владислав Наумов | 4eb1da3 | 2020-08-31 14:45:16 +0200 | [diff] [blame] | 118 | if (commitMsg ==~ /(?s).*\[disable-os-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*disable-os-demo\.*/) { |
| 119 | enableOSDemo = false |
| 120 | common.errorMsg('Openstack demo deployment will be aborted, VF -1 will be set') |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 121 | } |
| 122 | |
azvyagintsev | 1761bdc | 2020-09-04 17:24:12 +0300 | [diff] [blame] | 123 | if (commitMsg ==~ /(?s).*\[disable-bm-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*disable-bm-demo\.*/) { |
| 124 | enableBMDemo = false |
| 125 | common.errorMsg('BM demo deployment will be aborted, VF -1 will be set') |
| 126 | } |
| 127 | |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 128 | // TODO (vnaumov) remove below condition after moving all releases to UCP |
| 129 | def ucpChildMatches = (commitMsg =~ /(\[child-ucp\s*ucp-.*?\])/) |
| 130 | if (ucpChildMatches.size() > 0) { |
| 131 | deployChild = true |
| 132 | common.warningMsg('Forced UCP based child deployment triggered on patchset using custom keyword: \'[child-ucp ucp-5-1-0-3-3-0-example]\' ') |
| 133 | |
| 134 | // TODO(vnaumov) delete after ucp upgrades support |
| 135 | common.errorMsg('Child upgrade test will be skipped, UCP upgrades temporally disabled') |
| 136 | upgradeChild = false |
| 137 | } |
| 138 | |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 139 | // multiregional tests |
| 140 | def multiRegionalMatches = (commitMsg =~ /(\[multiregion\s*.*?\])/) |
| 141 | if (multiRegionalMatches.size() > 0) { |
| 142 | multiregionalMappings = multiregionWorkflowParser(multiRegionalMatches) |
| 143 | } |
| 144 | switch (multiregionalMappings['managementLocation']) { |
| 145 | case 'aws': |
| 146 | awsOnDemandDemo = true |
Ivan Berezovskiy | 07e1de1 | 2020-10-09 13:07:05 +0400 | [diff] [blame] | 147 | if (awsOnRhelDemo) { |
| 148 | // Run only one variant: standard AWS deployment (on Ubuntu) or on RHEL |
| 149 | awsOnDemandDemo = false |
| 150 | } |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 151 | common.warningMsg('Forced running additional kaas deployment with AWS provider according multiregional demo request') |
Владислав Наумов | 3e4b5a3 | 2020-09-11 17:05:34 +0200 | [diff] [blame] | 152 | break |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 153 | case 'os': |
| 154 | if (enableOSDemo == false) { |
| 155 | error('incompatible triggers: [disable-os-demo] and multiregional deployment based on OSt management region cannot be applied simultaneously') |
| 156 | } |
Владислав Наумов | 3e4b5a3 | 2020-09-11 17:05:34 +0200 | [diff] [blame] | 157 | break |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 158 | } |
| 159 | |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 160 | common.infoMsg(""" |
| 161 | Child cluster deployment scheduled: ${deployChild} |
| 162 | Child cluster release upgrade scheduled: ${upgradeChild} |
| 163 | Child conformance testing scheduled: ${runChildConformance} |
Владислав Наумов | 0dc9925 | 2020-11-13 13:30:48 +0100 | [diff] [blame^] | 164 | BYO cluster attachment scheduled: ${attachBYO} |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 165 | Mgmt cluster release upgrade scheduled: ${upgradeMgmt} |
| 166 | Mgmt conformance testing scheduled: ${runMgmtConformance} |
| 167 | Mgmt UI e2e testing scheduled: ${runUie2e} |
Владислав Наумов | 4eb1da3 | 2020-08-31 14:45:16 +0200 | [diff] [blame] | 168 | AWS provider deployment scheduled: ${awsOnDemandDemo} |
Ivan Berezovskiy | 07e1de1 | 2020-10-09 13:07:05 +0400 | [diff] [blame] | 169 | AWS provider on RHEL deployment scheduled: ${awsOnRhelDemo} |
Stanislav Riazanov | 24b9c5d | 2020-10-12 22:27:12 +0400 | [diff] [blame] | 170 | VSPHERE provider deployment scheduled: ${vsphereOnDemandDemo} |
Владислав Наумов | 4eb1da3 | 2020-08-31 14:45:16 +0200 | [diff] [blame] | 171 | OS provider deployment scheduled: ${enableOSDemo} |
azvyagintsev | 1761bdc | 2020-09-04 17:24:12 +0300 | [diff] [blame] | 172 | BM provider deployment scheduled: ${enableBMDemo} |
Владислав Наумов | f793fe3 | 2020-09-11 15:19:19 +0200 | [diff] [blame] | 173 | Multiregional configuration: ${multiregionalMappings} |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 174 | Service binaries fetching scheduled: ${fetchServiceBinaries} |
Владислав Наумов | 5a523ef | 2020-07-29 13:33:38 +0200 | [diff] [blame] | 175 | Triggers: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/""") |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 176 | return [ |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 177 | deployChildEnabled : deployChild, |
| 178 | upgradeChildEnabled : upgradeChild, |
| 179 | runChildConformanceEnabled : runChildConformance, |
Владислав Наумов | 0dc9925 | 2020-11-13 13:30:48 +0100 | [diff] [blame^] | 180 | attachBYOEnabled : attachBYO, |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 181 | upgradeMgmtEnabled : upgradeMgmt, |
| 182 | runUie2eEnabled : runUie2e, |
| 183 | runMgmtConformanceEnabled : runMgmtConformance, |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 184 | fetchServiceBinariesEnabled: fetchServiceBinaries, |
Владислав Наумов | 4eb1da3 | 2020-08-31 14:45:16 +0200 | [diff] [blame] | 185 | awsOnDemandDemoEnabled : awsOnDemandDemo, |
Ivan Berezovskiy | 07e1de1 | 2020-10-09 13:07:05 +0400 | [diff] [blame] | 186 | awsOnDemandRhelDemoEnabled : awsOnRhelDemo, |
Stanislav Riazanov | 24b9c5d | 2020-10-12 22:27:12 +0400 | [diff] [blame] | 187 | vsphereOnDemandDemoEnabled : vsphereOnDemandDemo, |
azvyagintsev | 1761bdc | 2020-09-04 17:24:12 +0300 | [diff] [blame] | 188 | bmDemoEnabled : enableBMDemo, |
Владислав Наумов | f793fe3 | 2020-09-11 15:19:19 +0200 | [diff] [blame] | 189 | osDemoEnabled : enableOSDemo, |
| 190 | multiregionalConfiguration : multiregionalMappings] |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | /** |
| 194 | * Determine management and regional setup for demo workflow scenario |
| 195 | * |
| 196 | * |
| 197 | * @param: keyword (string) string , represents keyworkd trigger, specified in gerrit commit body, like `[multiregion aws,os]` |
| 198 | or Jenkins environment string variable in form like 'aws,os' |
| 199 | * @return (map)[ |
| 200 | enabled: (bool), |
| 201 | * managementLocation: (string), //aws,os |
| 202 | * regionLocation: (string), //aws,os |
| 203 | * ] |
| 204 | */ |
| 205 | def multiregionWorkflowParser(keyword) { |
Владислав Наумов | 8c0c39d | 2020-09-11 14:46:48 +0200 | [diff] [blame] | 206 | def common = new com.mirantis.mk.Common() |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 207 | def supportedManagementProviders = ['os', 'aws'] |
| 208 | def supportedRegionalProviders = ['os'] |
| 209 | |
| 210 | def clusterTypes = '' |
Владислав Наумов | 38ed7bf | 2020-09-11 14:43:39 +0200 | [diff] [blame] | 211 | if (keyword.toString().contains('multiregion')) { |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 212 | common.infoMsg('Multiregion definition configured via gerrit keyword trigger') |
| 213 | clusterTypes = keyword[0][0].split('multiregion')[1].replaceAll('[\\[\\]]', '').trim().split(',') |
| 214 | } else { |
| 215 | common.infoMsg('Multiregion definition configured via environment variable') |
| 216 | clusterTypes = keyword.trim().split(',') |
| 217 | } |
| 218 | |
| 219 | if (clusterTypes.size() != 2) { |
Владислав Наумов | 482fb50 | 2020-10-30 17:59:27 +0100 | [diff] [blame] | 220 | error("Incorrect regions definiton, valid scheme: [multiregion ${management}, ${region}], got: ${clusterTypes}") |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 221 | } |
| 222 | |
Владислав Наумов | f793fe3 | 2020-09-11 15:19:19 +0200 | [diff] [blame] | 223 | def desiredManagementProvider = clusterTypes[0].trim() |
| 224 | def desiredRegionalProvider = clusterTypes[1].trim() |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 225 | if (! supportedManagementProviders.contains(desiredManagementProvider) || ! supportedRegionalProviders.contains(desiredRegionalProvider)) { |
| 226 | error("""unsupported management <-> regional bundle, available options: |
Владислав Наумов | f793fe3 | 2020-09-11 15:19:19 +0200 | [diff] [blame] | 227 | management providers list - ${supportedManagementProviders} |
| 228 | regional providers list - ${supportedRegionalProviders}""") |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | return [ |
| 232 | enabled: true, |
| 233 | managementLocation: desiredManagementProvider, |
| 234 | regionLocation: desiredRegionalProvider, |
| 235 | ] |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Determine if custom si tests/pipelines refspec forwarded from gerrit change request |
| 240 | |
Владислав Наумов | 5a523ef | 2020-07-29 13:33:38 +0200 | [diff] [blame] | 241 | * Keyword list: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/ |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 242 | * Used for components team to test component changes w/ custom SI refspecs using kaas/core deployment jobs |
| 243 | * Example scheme: |
| 244 | * New CR pushed in kubernetes/lcm-ansible -> parsing it's commit body and get custom test refspecs -> trigger deployment jobs from kaas/core |
| 245 | * manage refspecs through Jenkins Job Parameters |
| 246 | * |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 247 | * @return (map)[* siTests: (string) final refspec for si-tests |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 248 | * siPipelines: (string) final refspec for si-pipelines |
| 249 | * ] |
| 250 | */ |
| 251 | def checkCustomSIRefspec() { |
vnaumov | bdb9022 | 2020-05-04 18:25:50 +0200 | [diff] [blame] | 252 | def common = new com.mirantis.mk.Common() |
| 253 | |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 254 | // Available triggers and its sane defaults |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 255 | def siTestsRefspec = env.SI_TESTS_REFSPEC ?: 'master' |
| 256 | def siPipelinesRefspec = env.SI_PIPELINES_REFSPEC ?: 'master' |
Владислав Наумов | 2db15e2 | 2020-07-14 12:29:22 +0200 | [diff] [blame] | 257 | def siTestsDockerImage = env.SI_TESTS_DOCKER_IMAGE ?: 'docker-dev-kaas-local.docker.mirantis.net/mirantis/kaas/si-test' |
| 258 | def siTestsDockerImageTag = env.SI_TESTS_DOCKER_IMAGE_TAG ?: 'master' |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 259 | def commitMsg = env.GERRIT_CHANGE_COMMIT_MESSAGE ? new String(env.GERRIT_CHANGE_COMMIT_MESSAGE.decodeBase64()) : '' |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 260 | |
| 261 | def siTestMatches = (commitMsg =~ /(\[si-tests-ref\s*refs\/changes\/.*?\])/) |
| 262 | def siPipelinesMatches = (commitMsg =~ /(\[si-pipelines-ref\s*refs\/changes\/.*?\])/) |
| 263 | |
| 264 | if (siTestMatches.size() > 0) { |
| 265 | siTestsRefspec = siTestMatches[0][0].split('si-tests-ref')[1].replaceAll('[\\[\\]]', '').trim() |
Владислав Наумов | 2db15e2 | 2020-07-14 12:29:22 +0200 | [diff] [blame] | 266 | siTestsDockerImage = "docker-dev-local.docker.mirantis.net/review/kaas-si-test-${siTestsRefspec.split('/')[-2]}" |
| 267 | siTestsDockerImageTag = siTestsRefspec.split('/')[-1] |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 268 | } |
| 269 | if (siPipelinesMatches.size() > 0) { |
| 270 | siPipelinesRefspec = siPipelinesMatches[0][0].split('si-pipelines-ref')[1].replaceAll('[\\[\\]]', '').trim() |
| 271 | } |
| 272 | |
| 273 | common.infoMsg(""" |
| 274 | kaas/si-pipelines will be fetched from: ${siPipelinesRefspec} |
| 275 | kaas/si-tests will be fetched from: ${siTestsRefspec} |
Владислав Наумов | 2db15e2 | 2020-07-14 12:29:22 +0200 | [diff] [blame] | 276 | kaas/si-tests as dockerImage will be fetched from: ${siTestsDockerImage}:${siTestsDockerImageTag} |
Владислав Наумов | 5a523ef | 2020-07-29 13:33:38 +0200 | [diff] [blame] | 277 | Keywords: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/""") |
Владислав Наумов | 2db15e2 | 2020-07-14 12:29:22 +0200 | [diff] [blame] | 278 | return [siTests: siTestsRefspec, siPipelines: siPipelinesRefspec, siTestsDockerImage: siTestsDockerImage, siTestsDockerImageTag: siTestsDockerImageTag] |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 279 | } |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 280 | |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 281 | /** |
Владислав Наумов | 418042b | 2020-07-09 18:31:10 +0200 | [diff] [blame] | 282 | * Parse additional configuration for kaas component CICD repo |
Владислав Наумов | 30a516c | 2020-07-09 13:15:41 +0200 | [diff] [blame] | 283 | * @param configurationFile (str) path to configuration file in yaml format |
| 284 | * |
| 285 | * @return (map)[ siTestsFeatureFlags (string) dedicated feature flags that will be used in SI tests, |
| 286 | * ] |
| 287 | */ |
| 288 | def parseKaaSComponentCIParameters(configurationFile){ |
| 289 | def common = new com.mirantis.mk.Common() |
| 290 | def ciConfig = readYaml file: configurationFile |
| 291 | def ciSpec = [ |
| 292 | siTestsFeatureFlags: env.SI_TESTS_FEATURE_FLAGS ?: '', |
| 293 | ] |
| 294 | |
| 295 | if (ciConfig.containsKey('si-tests-feature-flags')) { |
| 296 | common.infoMsg("""SI tests feature flags customization detected, |
| 297 | results will be merged with existing flags: [${ciSpec['siTestsFeatureFlags']}] identification...""") |
| 298 | |
| 299 | def ffMeta = ciSpec['siTestsFeatureFlags'].tokenize(',').collect { it.trim() } |
| 300 | ffMeta.addAll(ciConfig['si-tests-feature-flags']) |
Владислав Наумов | 30a516c | 2020-07-09 13:15:41 +0200 | [diff] [blame] | 301 | |
Владислав Наумов | cb5ffca | 2020-07-14 15:28:36 +0200 | [diff] [blame] | 302 | ciSpec['siTestsFeatureFlags'] = ffMeta.unique().join(',') |
Владислав Наумов | 30a516c | 2020-07-09 13:15:41 +0200 | [diff] [blame] | 303 | common.infoMsg("SI tests custom feature flags: ${ciSpec['siTestsFeatureFlags']}") |
| 304 | } |
| 305 | |
| 306 | common.infoMsg("""Additional ci configuration parsed successfully: |
| 307 | siTestsFeatureFlags: ${ciSpec['siTestsFeatureFlags']}""") |
| 308 | return ciSpec |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * Determine if custom kaas core/pipelines refspec forwarded from gerrit change request |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 313 | |
Владислав Наумов | 5a523ef | 2020-07-29 13:33:38 +0200 | [diff] [blame] | 314 | * Keyword list: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/ |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 315 | * Used for components team to test component changes w/ custom Core refspecs using kaas/core deployment jobs |
| 316 | * Example scheme: |
| 317 | * New CR pushed in kubernetes/lcm-ansible -> parsing it's commit body and get custom test refspecs -> trigger deployment jobs from kaas/core |
| 318 | * manage refspecs through Jenkins Job Parameters |
| 319 | * |
| 320 | * @return (map)[ core: (string) final refspec for kaas/core |
| 321 | * corePipelines: (string) final refspec for pipelines in kaas/core |
| 322 | * ] |
| 323 | */ |
| 324 | def checkCustomCoreRefspec() { |
| 325 | def common = new com.mirantis.mk.Common() |
| 326 | |
| 327 | // Available triggers and its sane defaults |
| 328 | def coreRefspec = env.KAAS_CORE_REFSPEC ?: 'master' |
| 329 | // by default using value of GERRIT_REFSPEC parameter in *kaas/core jobs* |
| 330 | def corePipelinesRefspec = env.KAAS_PIPELINE_REFSPEC ?: '\$GERRIT_REFSPEC' |
| 331 | def commitMsg = env.GERRIT_CHANGE_COMMIT_MESSAGE ? new String(env.GERRIT_CHANGE_COMMIT_MESSAGE.decodeBase64()) : '' |
| 332 | |
| 333 | def coreMatches = (commitMsg =~ /(\[core-ref\s*refs\/changes\/.*?\])/) |
| 334 | def corePipelinesMatches = (commitMsg =~ /(\[core-pipelines-ref\s*refs\/changes\/.*?\])/) |
| 335 | |
| 336 | if (coreMatches.size() > 0) { |
| 337 | coreRefspec = coreMatches[0][0].split('core-ref')[1].replaceAll('[\\[\\]]', '').trim() |
| 338 | } |
| 339 | if (corePipelinesMatches.size() > 0) { |
| 340 | corePipelinesRefspec = corePipelinesMatches[0][0].split('core-pipelines-ref')[1].replaceAll('[\\[\\]]', '').trim() |
| 341 | } |
| 342 | |
| 343 | common.infoMsg(""" |
| 344 | kaas/core will be fetched from: ${coreRefspec} |
| 345 | kaas/core pipelines will be fetched from: ${corePipelinesRefspec} |
Владислав Наумов | 5a523ef | 2020-07-29 13:33:38 +0200 | [diff] [blame] | 346 | Keywords: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/""") |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 347 | return [core: coreRefspec, corePipelines: corePipelinesRefspec] |
| 348 | } |
| 349 | |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 350 | |
| 351 | /** |
Владислав Наумов | 92288d9 | 2020-07-13 18:36:21 +0200 | [diff] [blame] | 352 | * generate Jenkins Parameter objects from from text parameter with additonal kaas core context |
| 353 | * needed to forward inside kaas core set of jobs |
| 354 | * |
| 355 | * @param context (string) Representation of the string enviroment variables needed for kaas core jobs in yaml format |
| 356 | * @return (list)[ string(name: '', value: ''), |
| 357 | * ] |
| 358 | */ |
| 359 | def generateKaaSVarsFromContext(context) { |
| 360 | def common = new com.mirantis.mk.Common() |
| 361 | def parameters = [] |
| 362 | def config = readYaml text: context |
| 363 | |
| 364 | config.each { k,v -> |
| 365 | common.infoMsg("Custom KaaS Core context parameter: ${k}=${v}") |
| 366 | parameters.add(string(name: k, value: v)) |
| 367 | } |
| 368 | |
| 369 | return parameters |
| 370 | } |
| 371 | |
| 372 | /** |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 373 | * Trigger KaaS demo jobs based on AWS/OS providers with customized test suite, parsed from external sources (gerrit commit/jj vars) |
Владислав Наумов | 5a523ef | 2020-07-29 13:33:38 +0200 | [diff] [blame] | 374 | * Keyword list: https://docs.google.com/document/d/1SSPD8ZdljbqmNl_FEAvTHUTow9Ki8NIMu82IcAVhzXw/ |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 375 | * Used for components team to test component changes w/ customized SI tests/refspecs using kaas/core deployment jobs |
| 376 | * |
Владислав Наумов | 418042b | 2020-07-09 18:31:10 +0200 | [diff] [blame] | 377 | * @param: component (string) component name [iam, lcm, stacklight] |
| 378 | * @param: patchSpec (string) Patch for kaas/cluster releases in json format |
| 379 | * @param: configurationFile (string) Additional file for component repo CI config in yaml format |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 380 | */ |
Владислав Наумов | 92288d9 | 2020-07-13 18:36:21 +0200 | [diff] [blame] | 381 | def triggerPatchedComponentDemo(component, patchSpec = '', configurationFile = '.ci-parameters.yaml', coreContext = '') { |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 382 | def common = new com.mirantis.mk.Common() |
| 383 | // Determine if custom trigger keywords forwarded from gerrit |
| 384 | def triggers = checkDeploymentTestSuite() |
| 385 | // Determine SI refspecs |
| 386 | def siRefspec = checkCustomSIRefspec() |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 387 | // Determine Core refspecs |
| 388 | def coreRefspec = checkCustomCoreRefspec() |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 389 | |
Владислав Наумов | 418042b | 2020-07-09 18:31:10 +0200 | [diff] [blame] | 390 | // Determine component repo ci configuration |
| 391 | def ciSpec = [:] |
| 392 | def componentFeatureFlags = env.SI_TESTS_FEATURE_FLAGS ?: '' |
| 393 | if (fileExists(configurationFile)) { |
| 394 | common.infoMsg('Component CI configuration file detected, parsing...') |
| 395 | ciSpec = parseKaaSComponentCIParameters(configurationFile) |
| 396 | componentFeatureFlags = ciSpec['siTestsFeatureFlags'] |
| 397 | } else { |
| 398 | common.warningMsg('''Component CI configuration file is not exists, |
Владислав Наумов | c17dd55 | 2020-07-29 17:07:38 +0200 | [diff] [blame] | 399 | several code-management features may be unavailable, |
Владислав Наумов | 92288d9 | 2020-07-13 18:36:21 +0200 | [diff] [blame] | 400 | follow https://mirantis.jira.com/wiki/spaces/QA/pages/2310832276/SI-tests+feature+flags#%5BUpdated%5D-Using-a-feature-flag |
| 401 | to create the configuration file''') |
Владислав Наумов | 418042b | 2020-07-09 18:31:10 +0200 | [diff] [blame] | 402 | } |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 403 | def jobs = [:] |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 404 | def parameters = [ |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 405 | string(name: 'GERRIT_REFSPEC', value: coreRefspec.core), |
| 406 | string(name: 'KAAS_PIPELINE_REFSPEC', value: coreRefspec.corePipelines), |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 407 | string(name: 'SI_TESTS_REFSPEC', value: siRefspec.siTests), |
Владислав Наумов | 418042b | 2020-07-09 18:31:10 +0200 | [diff] [blame] | 408 | string(name: 'SI_TESTS_FEATURE_FLAGS', value: componentFeatureFlags), |
Владислав Наумов | 2db15e2 | 2020-07-14 12:29:22 +0200 | [diff] [blame] | 409 | string(name: 'SI_TESTS_DOCKER_IMAGE', value: siRefspec.siTestsDockerImage), |
| 410 | string(name: 'SI_TESTS_DOCKER_IMAGE_TAG', value: siRefspec.siTestsDockerImageTag), |
Владислав Наумов | 4a5c324 | 2020-06-08 14:36:11 +0200 | [diff] [blame] | 411 | string(name: 'SI_PIPELINES_REFSPEC', value: siRefspec.siPipelines), |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 412 | string(name: 'CUSTOM_RELEASE_PATCH_SPEC', value: patchSpec), |
Владислав Наумов | 080d941 | 2020-07-29 13:05:14 +0200 | [diff] [blame] | 413 | booleanParam(name: 'UPGRADE_MGMT_CLUSTER', value: triggers.upgradeMgmtEnabled), |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 414 | booleanParam(name: 'RUN_UI_E2E', value: triggers.runUie2eEnabled), |
Владислав Наумов | 080d941 | 2020-07-29 13:05:14 +0200 | [diff] [blame] | 415 | booleanParam(name: 'RUN_MGMT_CFM', value: triggers.runMgmtConformanceEnabled), |
| 416 | booleanParam(name: 'DEPLOY_CHILD_CLUSTER', value: triggers.deployChildEnabled), |
| 417 | booleanParam(name: 'UPGRADE_CHILD_CLUSTER', value: triggers.upgradeChildEnabled), |
Владислав Наумов | 0dc9925 | 2020-11-13 13:30:48 +0100 | [diff] [blame^] | 418 | booleanParam(name: 'ATTACH_BYO', value: triggers.attachBYOEnabled), |
Владислав Наумов | 080d941 | 2020-07-29 13:05:14 +0200 | [diff] [blame] | 419 | booleanParam(name: 'RUN_CHILD_CFM', value: triggers.runChildConformanceEnabled), |
Ivan Berezovskiy | 07e1de1 | 2020-10-09 13:07:05 +0400 | [diff] [blame] | 420 | booleanParam(name: 'ALLOW_AWS_ON_DEMAND', value: triggers.awsOnDemandDemoEnabled || triggers.awsOnDemandRhelDemoEnabled), |
Stanislav Riazanov | 24b9c5d | 2020-10-12 22:27:12 +0400 | [diff] [blame] | 421 | booleanParam(name: 'ALLOW_VSPHERE_ON_DEMAND', value: triggers.vsphereOnDemandDemoEnabled), |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 422 | ] |
Владислав Наумов | 92288d9 | 2020-07-13 18:36:21 +0200 | [diff] [blame] | 423 | |
Владислав Наумов | 765f3bd | 2020-09-07 18:09:24 +0200 | [diff] [blame] | 424 | // customize multiregional demo |
| 425 | if (triggers.multiregionalConfiguration.enabled) { |
| 426 | parameters.add(string(name: 'MULTIREGION_SETUP', |
| 427 | value: "${triggers.multiregionalConfiguration.managementLocation},${triggers.multiregionalConfiguration.regionLocation}" |
| 428 | )) |
| 429 | } |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 430 | |
Владислав Наумов | 92288d9 | 2020-07-13 18:36:21 +0200 | [diff] [blame] | 431 | // Determine component team custom context |
| 432 | if (coreContext != '') { |
| 433 | common.infoMsg('Additional KaaS Core context detected, will be forwarded into kaas core cicd...') |
| 434 | def additionalParameters = generateKaaSVarsFromContext(coreContext) |
Владислав Наумов | bef51a9 | 2020-10-01 17:36:51 +0200 | [diff] [blame] | 435 | parameters.addAll(additionalParameters) |
Владислав Наумов | 92288d9 | 2020-07-13 18:36:21 +0200 | [diff] [blame] | 436 | } |
| 437 | |
Владислав Наумов | aa43061 | 2020-06-08 17:18:31 +0200 | [diff] [blame] | 438 | def jobResults = [] |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 439 | jobs["kaas-core-openstack-patched-${component}"] = { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 440 | try { |
| 441 | common.infoMsg('Deploy: patched KaaS demo with Openstack provider') |
Владислав Наумов | 4aa112d | 2020-06-16 18:52:21 +0200 | [diff] [blame] | 442 | os_job_info = build job: "kaas-testing-core-openstack-workflow-${component}", parameters: parameters, wait: true |
| 443 | def build_description = os_job_info.getDescription() |
Владислав Наумов | d044e84 | 2020-06-17 15:33:43 +0200 | [diff] [blame] | 444 | def build_result = os_job_info.getResult() |
| 445 | jobResults.add(build_result) |
| 446 | |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 447 | if (build_description) { |
| 448 | currentBuild.description += build_description |
| 449 | } |
| 450 | } finally { |
Владислав Наумов | 6d741fa | 2020-06-17 17:35:43 +0200 | [diff] [blame] | 451 | common.infoMsg('Patched KaaS demo with Openstack provider finished') |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 452 | } |
| 453 | } |
| 454 | if (triggers.awsOnDemandDemoEnabled) { |
Владислав Наумов | 5928195 | 2020-07-29 16:43:49 +0200 | [diff] [blame] | 455 | common.infoMsg('AWS demo triggered, need to sync artifacts in the public-ci cdn..') |
| 456 | switch (component) { |
| 457 | case 'iam': |
| 458 | build job: 'cdn-binary-dev-replication-iam', propagate: true, wait: true |
| 459 | break |
| 460 | case 'lcm': |
| 461 | build job: 'cdn-binary-dev-replication-lcm', propagate: true, wait: true |
| 462 | break |
| 463 | } |
| 464 | |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 465 | jobs["kaas-core-aws-patched-${component}"] = { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 466 | try { |
| 467 | common.infoMsg('Deploy: patched KaaS demo with AWS provider') |
Владислав Наумов | 4aa112d | 2020-06-16 18:52:21 +0200 | [diff] [blame] | 468 | aws_job_info = build job: "kaas-testing-core-aws-workflow-${component}", parameters: parameters, wait: true |
| 469 | def build_description = aws_job_info.getDescription() |
Владислав Наумов | d044e84 | 2020-06-17 15:33:43 +0200 | [diff] [blame] | 470 | def build_result = aws_job_info.getResult() |
| 471 | jobResults.add(build_result) |
| 472 | |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 473 | if (build_description) { |
| 474 | currentBuild.description += build_description |
| 475 | } |
| 476 | } finally { |
Владислав Наумов | 6d741fa | 2020-06-17 17:35:43 +0200 | [diff] [blame] | 477 | common.infoMsg('Patched KaaS demo with AWS provider finished') |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 478 | } |
| 479 | } |
| 480 | } |
Stanislav Riazanov | 24b9c5d | 2020-10-12 22:27:12 +0400 | [diff] [blame] | 481 | if (triggers.vsphereOnDemandDemoEnabled) { |
| 482 | jobs["kaas-core-vsphere-patched-${component}"] = { |
| 483 | try { |
| 484 | common.infoMsg('Deploy: patched KaaS demo with VSPHERE provider') |
| 485 | vsphere_job_info = build job: "kaas-testing-core-vsphere-workflow-${component}", parameters: parameters, wait: true |
| 486 | def build_description = vsphere_job_info.getDescription() |
| 487 | def build_result = vsphere_job_info.getResult() |
| 488 | jobResults.add(build_result) |
| 489 | |
| 490 | if (build_description) { |
| 491 | currentBuild.description += build_description |
| 492 | } |
| 493 | } finally { |
| 494 | common.infoMsg('Patched KaaS demo with VSPHERE provider finished') |
| 495 | } |
| 496 | } |
| 497 | } |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 498 | |
| 499 | common.infoMsg('Trigger KaaS demo deployments according to defined provider set') |
| 500 | // Limit build concurency workaround examples: https://issues.jenkins-ci.org/browse/JENKINS-44085 |
| 501 | parallel jobs |
Владислав Наумов | aa43061 | 2020-06-08 17:18:31 +0200 | [diff] [blame] | 502 | |
| 503 | if (jobResults.contains('FAILURE')) { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 504 | common.infoMsg('One of parallel downstream jobs is failed, mark executor job as failed') |
Владислав Наумов | aa43061 | 2020-06-08 17:18:31 +0200 | [diff] [blame] | 505 | currentBuild.result = 'FAILURE' |
| 506 | } |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 507 | } |
Владислав Наумов | 30a516c | 2020-07-09 13:15:41 +0200 | [diff] [blame] | 508 | |
| 509 | |