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 | |
| 9 | |
| 10 | /** |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 11 | * Determine scope of test suite against per-commit KaaS deployment based on keywords |
| 12 | * Keyword list: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/.git-message-template#50 |
| 13 | * |
| 14 | * Used for components team to combine test-suites and forward desired parameters to kaas/core deployment jobs |
| 15 | * Example scheme: |
| 16 | * New CR pushed in kubernetes/lcm-ansible -> parsing it's commit body and combine test-suite -> trigger deployment jobs from kaas/core |
| 17 | * manage test-suite through Jenkins Job Parameters |
| 18 | * |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 19 | * @return (map)[ |
| 20 | * deployChildEnabled: (bool) True if need to deploy child cluster during demo-run |
| 21 | * runUie2eEnabled: (bool) True if need to run ui-e2e cluster during demo-run |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 22 | * ] |
| 23 | */ |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 24 | def checkDeploymentTestSuite() { |
vnaumov | bdb9022 | 2020-05-04 18:25:50 +0200 | [diff] [blame] | 25 | def common = new com.mirantis.mk.Common() |
| 26 | |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 27 | // Available triggers and its sane defaults |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 28 | def deployChild = env.DEPLOY_CHILD_CLUSTER ? env.DEPLOY_CHILD_CLUSTER.toBoolean() : false |
| 29 | def upgradeChild = env.UPGRADE_CHILD_CLUSTER ? env.UPGRADE_CHILD_CLUSTER.toBoolean() : false |
| 30 | def upgradeMgmt = env.UPGRADE_MGMT_CLUSTER ? env.UPGRADE_MGMT_CLUSTER.toBoolean() : false |
| 31 | def runUie2e = env.RUN_UI_E2E ? env.RUN_UI_E2E.toBoolean() : false |
| 32 | def runMgmtConformance = env.RUN_MGMT_CFM ? env.RUN_MGMT_CFM.toBoolean() : false |
| 33 | def runChildConformance = env.RUN_CHILD_CFM ? env.RUN_CHILD_CFM.toBoolean() : false |
| 34 | def fetchServiceBinaries = env.FETCH_BINARIES_FROM_UPSTREAM ? env.FETCH_BINARIES_FROM_UPSTREAM.toBoolean() : false |
Владислав Наумов | 905dd36 | 2020-06-08 16:37:01 +0200 | [diff] [blame] | 35 | def awsOnDemandDemo = env.ALLOW_AWS_ON_DEMAND ? env.ALLOW_AWS_ON_DEMAND.toBoolean() : false |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 36 | |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 37 | 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] | 38 | if (commitMsg ==~ /(?s).*\[child-deploy\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-deploy.*/ || upgradeChild || runChildConformance) { |
| 39 | deployChild = true |
| 40 | } |
| 41 | if (commitMsg ==~ /(?s).*\[child-upgrade\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-upgrade.*/) { |
| 42 | deployChild = true |
| 43 | upgradeChild = true |
| 44 | } |
| 45 | if (commitMsg ==~ /(?s).*\[mgmt-upgrade\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*mgmt-upgrade.*/) { |
| 46 | upgradeMgmt = true |
| 47 | } |
| 48 | if (commitMsg ==~ /(?s).*\[ui-e2e\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*ui-e2e.*/) { |
| 49 | runUie2e = true |
| 50 | } |
| 51 | if (commitMsg ==~ /(?s).*\[mgmt-cfm\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*mgmt-cfm.*/) { |
| 52 | runMgmtConformance = true |
| 53 | } |
| 54 | if (commitMsg ==~ /(?s).*\[child-cfm\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*child-cfm.*/) { |
| 55 | runChildConformance = true |
| 56 | deployChild = true |
| 57 | } |
| 58 | if (commitMsg ==~ /(?s).*\[fetch.*binaries\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*fetch.*binaries.*/) { |
| 59 | fetchServiceBinaries = true |
| 60 | } |
| 61 | if (commitMsg ==~ /(?s).*\[aws-demo\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*aws-demo.*/) { |
| 62 | awsOnDemandDemo = true |
| 63 | common.warningMsg('Forced running additional kaas deployment with AWS provider, triggered on patchset using custom keyword: \'aws-demo\' ') |
| 64 | } |
| 65 | |
| 66 | // TODO (vnaumov) remove below condition after moving all releases to UCP |
| 67 | def ucpChildMatches = (commitMsg =~ /(\[child-ucp\s*ucp-.*?\])/) |
| 68 | if (ucpChildMatches.size() > 0) { |
| 69 | deployChild = true |
| 70 | common.warningMsg('Forced UCP based child deployment triggered on patchset using custom keyword: \'[child-ucp ucp-5-1-0-3-3-0-example]\' ') |
| 71 | |
| 72 | // TODO(vnaumov) delete after ucp upgrades support |
| 73 | common.errorMsg('Child upgrade test will be skipped, UCP upgrades temporally disabled') |
| 74 | upgradeChild = false |
| 75 | } |
| 76 | |
| 77 | common.infoMsg(""" |
| 78 | Child cluster deployment scheduled: ${deployChild} |
| 79 | Child cluster release upgrade scheduled: ${upgradeChild} |
| 80 | Child conformance testing scheduled: ${runChildConformance} |
| 81 | Mgmt cluster release upgrade scheduled: ${upgradeMgmt} |
| 82 | Mgmt conformance testing scheduled: ${runMgmtConformance} |
| 83 | Mgmt UI e2e testing scheduled: ${runUie2e} |
| 84 | AWS provider additional deployment scheduled: ${awsOnDemandDemo} |
| 85 | Service binaries fetching scheduled: ${fetchServiceBinaries} |
| 86 | Triggers: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/.git-message-template#50""") |
| 87 | return [ |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 88 | deployChildEnabled : deployChild, |
| 89 | upgradeChildEnabled : upgradeChild, |
| 90 | runChildConformanceEnabled : runChildConformance, |
| 91 | upgradeMgmtEnabled : upgradeMgmt, |
| 92 | runUie2eEnabled : runUie2e, |
| 93 | runMgmtConformanceEnabled : runMgmtConformance, |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 94 | fetchServiceBinariesEnabled: fetchServiceBinaries, |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 95 | awsOnDemandDemoEnabled : awsOnDemandDemo] |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Determine if custom si tests/pipelines refspec forwarded from gerrit change request |
| 100 | |
| 101 | * Keyword list: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/.git-message-template#59 |
| 102 | * Used for components team to test component changes w/ custom SI refspecs using kaas/core deployment jobs |
| 103 | * Example scheme: |
| 104 | * New CR pushed in kubernetes/lcm-ansible -> parsing it's commit body and get custom test refspecs -> trigger deployment jobs from kaas/core |
| 105 | * manage refspecs through Jenkins Job Parameters |
| 106 | * |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 107 | * @return (map)[* siTests: (string) final refspec for si-tests |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 108 | * siPipelines: (string) final refspec for si-pipelines |
| 109 | * ] |
| 110 | */ |
| 111 | def checkCustomSIRefspec() { |
vnaumov | bdb9022 | 2020-05-04 18:25:50 +0200 | [diff] [blame] | 112 | def common = new com.mirantis.mk.Common() |
| 113 | |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 114 | // Available triggers and its sane defaults |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 115 | def siTestsRefspec = env.SI_TESTS_REFSPEC ?: 'master' |
Владислав Наумов | 8a0598b | 2020-06-15 18:36:53 +0200 | [diff] [blame] | 116 | def siTestsFeatureFlags = env.SI_TESTS_FEATURE_FLAGS ?: '' |
Владислав Наумов | 6c2afff | 2020-06-05 12:54:53 +0200 | [diff] [blame] | 117 | def siPipelinesRefspec = env.SI_PIPELINES_REFSPEC ?: 'master' |
| 118 | def siTestsDockerImage = env.SI_TESTS_DOCKER_IMAGE ?: 'docker-dev-kaas-local.docker.mirantis.net/mirantis/kaas/si-test:master' |
| 119 | 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] | 120 | |
| 121 | def siTestMatches = (commitMsg =~ /(\[si-tests-ref\s*refs\/changes\/.*?\])/) |
Владислав Наумов | 8a0598b | 2020-06-15 18:36:53 +0200 | [diff] [blame] | 122 | def siFeatureFlagsMatches = (commitMsg =~ /(\[si-feature-flags\s.*?\])/) |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 123 | def siPipelinesMatches = (commitMsg =~ /(\[si-pipelines-ref\s*refs\/changes\/.*?\])/) |
| 124 | |
| 125 | if (siTestMatches.size() > 0) { |
| 126 | siTestsRefspec = siTestMatches[0][0].split('si-tests-ref')[1].replaceAll('[\\[\\]]', '').trim() |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 127 | siTestsDockerImage = "docker-dev-local.docker.mirantis.net/review/" + |
| 128 | "kaas-si-test-${siTestsRefspec.split('/')[-2]}:${siTestsRefspec.split('/')[-1]}" |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 129 | } |
Владислав Наумов | 8a0598b | 2020-06-15 18:36:53 +0200 | [diff] [blame] | 130 | if (siFeatureFlagsMatches.size() > 0) { |
Владислав Наумов | 7633344 | 2020-06-16 15:01:53 +0200 | [diff] [blame] | 131 | siTestsFeatureFlags = siFeatureFlagsMatches[0][0].split('si-feature-flags')[1].replaceAll('[\\[\\]]', '').trim() |
Владислав Наумов | 8a0598b | 2020-06-15 18:36:53 +0200 | [diff] [blame] | 132 | } |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 133 | if (siPipelinesMatches.size() > 0) { |
| 134 | siPipelinesRefspec = siPipelinesMatches[0][0].split('si-pipelines-ref')[1].replaceAll('[\\[\\]]', '').trim() |
| 135 | } |
| 136 | |
| 137 | common.infoMsg(""" |
| 138 | kaas/si-pipelines will be fetched from: ${siPipelinesRefspec} |
| 139 | kaas/si-tests will be fetched from: ${siTestsRefspec} |
azvyagintsev | a12230a | 2020-06-05 13:24:06 +0300 | [diff] [blame] | 140 | kaas/si-tests as dockerImage will be fetched from: ${siTestsDockerImage} |
Владислав Наумов | 8a0598b | 2020-06-15 18:36:53 +0200 | [diff] [blame] | 141 | kaas/si-tests additional feature flags applied: [${siTestsFeatureFlags}] |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 142 | Keywords: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/.git-message-template#59""") |
Владислав Наумов | 8a0598b | 2020-06-15 18:36:53 +0200 | [diff] [blame] | 143 | return [siTests: siTestsRefspec, siFeatureFlags: siTestsFeatureFlags, siPipelines: siPipelinesRefspec, siTestsDockerImage: siTestsDockerImage] |
vnaumov | 33747e1 | 2020-05-04 17:35:20 +0200 | [diff] [blame] | 144 | } |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 145 | |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 146 | /** |
| 147 | * Determine if custom kaas core/pipelines refspec forwarded from gerrit change request |
| 148 | |
| 149 | * Keyword list: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/.git-message-template#59 |
| 150 | * Used for components team to test component changes w/ custom Core refspecs using kaas/core deployment jobs |
| 151 | * Example scheme: |
| 152 | * New CR pushed in kubernetes/lcm-ansible -> parsing it's commit body and get custom test refspecs -> trigger deployment jobs from kaas/core |
| 153 | * manage refspecs through Jenkins Job Parameters |
| 154 | * |
| 155 | * @return (map)[ core: (string) final refspec for kaas/core |
| 156 | * corePipelines: (string) final refspec for pipelines in kaas/core |
| 157 | * ] |
| 158 | */ |
| 159 | def checkCustomCoreRefspec() { |
| 160 | def common = new com.mirantis.mk.Common() |
| 161 | |
| 162 | // Available triggers and its sane defaults |
| 163 | def coreRefspec = env.KAAS_CORE_REFSPEC ?: 'master' |
| 164 | // by default using value of GERRIT_REFSPEC parameter in *kaas/core jobs* |
| 165 | def corePipelinesRefspec = env.KAAS_PIPELINE_REFSPEC ?: '\$GERRIT_REFSPEC' |
| 166 | def commitMsg = env.GERRIT_CHANGE_COMMIT_MESSAGE ? new String(env.GERRIT_CHANGE_COMMIT_MESSAGE.decodeBase64()) : '' |
| 167 | |
| 168 | def coreMatches = (commitMsg =~ /(\[core-ref\s*refs\/changes\/.*?\])/) |
| 169 | def corePipelinesMatches = (commitMsg =~ /(\[core-pipelines-ref\s*refs\/changes\/.*?\])/) |
| 170 | |
| 171 | if (coreMatches.size() > 0) { |
| 172 | coreRefspec = coreMatches[0][0].split('core-ref')[1].replaceAll('[\\[\\]]', '').trim() |
| 173 | } |
| 174 | if (corePipelinesMatches.size() > 0) { |
| 175 | corePipelinesRefspec = corePipelinesMatches[0][0].split('core-pipelines-ref')[1].replaceAll('[\\[\\]]', '').trim() |
| 176 | } |
| 177 | |
| 178 | common.infoMsg(""" |
| 179 | kaas/core will be fetched from: ${coreRefspec} |
| 180 | kaas/core pipelines will be fetched from: ${corePipelinesRefspec} |
| 181 | Keywords: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/.git-message-template#59""") |
| 182 | return [core: coreRefspec, corePipelines: corePipelinesRefspec] |
| 183 | } |
| 184 | |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 185 | |
| 186 | /** |
| 187 | * Trigger KaaS demo jobs based on AWS/OS providers with customized test suite, parsed from external sources (gerrit commit/jj vars) |
| 188 | * Keyword list: https://gerrit.mcp.mirantis.com/plugins/gitiles/kaas/core/+/refs/heads/master/.git-message-template |
| 189 | * Used for components team to test component changes w/ customized SI tests/refspecs using kaas/core deployment jobs |
| 190 | * |
| 191 | * @param: (string) component name [iam, lcm, stacklight] |
| 192 | * @param: (string) Patch for kaas/cluster releases in json format |
| 193 | */ |
| 194 | def triggerPatchedComponentDemo(component, patchSpec) { |
| 195 | def common = new com.mirantis.mk.Common() |
| 196 | // Determine if custom trigger keywords forwarded from gerrit |
| 197 | def triggers = checkDeploymentTestSuite() |
| 198 | // Determine SI refspecs |
| 199 | def siRefspec = checkCustomSIRefspec() |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 200 | // Determine Core refspecs |
| 201 | def coreRefspec = checkCustomCoreRefspec() |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 202 | |
| 203 | def jobs = [:] |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 204 | def parameters = [ |
Владислав Наумов | 9080f37 | 2020-06-08 13:57:16 +0200 | [diff] [blame] | 205 | string(name: 'GERRIT_REFSPEC', value: coreRefspec.core), |
| 206 | string(name: 'KAAS_PIPELINE_REFSPEC', value: coreRefspec.corePipelines), |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 207 | string(name: 'SI_TESTS_REFSPEC', value: siRefspec.siTests), |
Владислав Наумов | 8a0598b | 2020-06-15 18:36:53 +0200 | [diff] [blame] | 208 | string(name: 'SI_TESTS_FEATURE_FLAGS', value: siRefspec.siFeatureFlags), |
Владислав Наумов | 4a5c324 | 2020-06-08 14:36:11 +0200 | [diff] [blame] | 209 | string(name: 'SI_PIPELINES_REFSPEC', value: siRefspec.siPipelines), |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 210 | string(name: 'CUSTOM_RELEASE_PATCH_SPEC', value: patchSpec), |
| 211 | booleanParam(name: 'UPGRADE_MGMT', value: triggers.upgradeMgmtEnabled), |
| 212 | booleanParam(name: 'RUN_UI_E2E', value: triggers.runUie2eEnabled), |
| 213 | booleanParam(name: 'RUN_MGMT_CONFORMANCE', value: triggers.runMgmtConformanceEnabled), |
| 214 | booleanParam(name: 'DEPLOY_CHILD', value: triggers.deployChildEnabled), |
| 215 | booleanParam(name: 'UPGRADE_CHILD', value: triggers.upgradeChildEnabled), |
| 216 | booleanParam(name: 'RUN_CHILD_CONFORMANCE', value: triggers.runChildConformanceEnabled), |
Владислав Наумов | 905dd36 | 2020-06-08 16:37:01 +0200 | [diff] [blame] | 217 | booleanParam(name: 'ALLOW_AWS_ON_DEMAND', value: triggers.awsOnDemandDemoEnabled), |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 218 | ] |
| 219 | |
Владислав Наумов | aa43061 | 2020-06-08 17:18:31 +0200 | [diff] [blame] | 220 | def jobResults = [] |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 221 | jobs["kaas-core-openstack-patched-${component}"] = { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 222 | try { |
| 223 | common.infoMsg('Deploy: patched KaaS demo with Openstack provider') |
Владислав Наумов | 4aa112d | 2020-06-16 18:52:21 +0200 | [diff] [blame] | 224 | os_job_info = build job: "kaas-testing-core-openstack-workflow-${component}", parameters: parameters, wait: true |
| 225 | def build_description = os_job_info.getDescription() |
Владислав Наумов | d044e84 | 2020-06-17 15:33:43 +0200 | [diff] [blame^] | 226 | def build_result = os_job_info.getResult() |
| 227 | jobResults.add(build_result) |
| 228 | |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 229 | if (build_description) { |
| 230 | currentBuild.description += build_description |
| 231 | } |
| 232 | } finally { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 233 | common.infoMsg("Patched KaaS demo with Openstack provider finished with status: ${build_result}") |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 234 | } |
| 235 | } |
| 236 | if (triggers.awsOnDemandDemoEnabled) { |
| 237 | jobs["kaas-core-aws-patched-${component}"] = { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 238 | try { |
| 239 | common.infoMsg('Deploy: patched KaaS demo with AWS provider') |
Владислав Наумов | 4aa112d | 2020-06-16 18:52:21 +0200 | [diff] [blame] | 240 | aws_job_info = build job: "kaas-testing-core-aws-workflow-${component}", parameters: parameters, wait: true |
| 241 | def build_description = aws_job_info.getDescription() |
Владислав Наумов | d044e84 | 2020-06-17 15:33:43 +0200 | [diff] [blame^] | 242 | def build_result = aws_job_info.getResult() |
| 243 | jobResults.add(build_result) |
| 244 | |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 245 | if (build_description) { |
| 246 | currentBuild.description += build_description |
| 247 | } |
| 248 | } finally { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 249 | common.infoMsg("Patched KaaS demo with AWS provider finished with status: ${build_result}") |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 250 | } |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | common.infoMsg('Trigger KaaS demo deployments according to defined provider set') |
| 255 | // Limit build concurency workaround examples: https://issues.jenkins-ci.org/browse/JENKINS-44085 |
| 256 | parallel jobs |
Владислав Наумов | aa43061 | 2020-06-08 17:18:31 +0200 | [diff] [blame] | 257 | |
| 258 | if (jobResults.contains('FAILURE')) { |
Владислав Наумов | f86b111 | 2020-06-09 14:04:48 +0200 | [diff] [blame] | 259 | common.infoMsg('One of parallel downstream jobs is failed, mark executor job as failed') |
Владислав Наумов | aa43061 | 2020-06-08 17:18:31 +0200 | [diff] [blame] | 260 | currentBuild.result = 'FAILURE' |
| 261 | } |
Владислав Наумов | 2a982ff | 2020-06-02 19:06:46 +0200 | [diff] [blame] | 262 | } |