Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 1 | /** |
| 2 | * Generate cookiecutter cluster by individual products |
| 3 | * |
| 4 | * Expected parameters: |
Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 5 | * COOKIECUTTER_TEMPLATE_CONTEXT Context parameters for the template generation. |
Tomáš Kukrál | 91e4925 | 2017-05-09 14:40:26 +0200 | [diff] [blame] | 6 | * EMAIL_ADDRESS Email to send a created tar file |
Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 7 | * |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 8 | **/ |
Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 9 | |
| 10 | common = new com.mirantis.mk.Common() |
| 11 | git = new com.mirantis.mk.Git() |
| 12 | python = new com.mirantis.mk.Python() |
chnyda | 8919101 | 2017-05-29 15:38:35 +0200 | [diff] [blame] | 13 | saltModelTesting = new com.mirantis.mk.SaltModelTesting() |
Tomáš Kukrál | cebc1a0 | 2017-07-25 16:10:37 +0200 | [diff] [blame] | 14 | ssh = new com.mirantis.mk.Ssh() |
Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 15 | |
Vasyl Saienko | 682043d | 2018-07-23 16:04:10 +0300 | [diff] [blame] | 16 | def reclassVersion = 'v1.5.4' |
Vasyl Saienko | 772e123 | 2018-07-23 14:42:24 +0300 | [diff] [blame] | 17 | if (common.validInputParam('RECLASS_VERSION')) { |
| 18 | reclassVersion = RECLASS_VERSION |
| 19 | } |
| 20 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 21 | timeout(time: 12, unit: 'HOURS') { |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 22 | node("python&&docker") { |
| 23 | def templateEnv = "${env.WORKSPACE}/template" |
| 24 | def modelEnv = "${env.WORKSPACE}/model" |
| 25 | def testEnv = "${env.WORKSPACE}/test" |
| 26 | def pipelineEnv = "${env.WORKSPACE}/pipelines" |
Tomáš Kukrál | 9f6260f | 2017-03-29 23:58:26 +0200 | [diff] [blame] | 27 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 28 | try { |
| 29 | def templateContext = readYaml text: COOKIECUTTER_TEMPLATE_CONTEXT |
| 30 | def mcpVersion = templateContext.default_context.mcp_version |
| 31 | def sharedReclassUrl = templateContext.default_context.shared_reclass_url |
| 32 | def clusterDomain = templateContext.default_context.cluster_domain |
| 33 | def clusterName = templateContext.default_context.cluster_name |
| 34 | def saltMaster = templateContext.default_context.salt_master_hostname |
| 35 | def localRepositories = templateContext.default_context.local_repositories.toBoolean() |
| 36 | def offlineDeployment = templateContext.default_context.offline_deployment.toBoolean() |
| 37 | def cutterEnv = "${env.WORKSPACE}/cutter" |
| 38 | def jinjaEnv = "${env.WORKSPACE}/jinja" |
| 39 | def outputDestination = "${modelEnv}/classes/cluster/${clusterName}" |
| 40 | def systemEnv = "${modelEnv}/classes/system" |
| 41 | def targetBranch = "feature/${clusterName}" |
| 42 | def templateBaseDir = "${env.WORKSPACE}/template" |
| 43 | def templateDir = "${templateEnv}/template/dir" |
| 44 | def templateOutputDir = templateBaseDir |
| 45 | def user |
| 46 | wrap([$class: 'BuildUser']) { |
| 47 | user = env.BUILD_USER_ID |
| 48 | } |
| 49 | |
| 50 | currentBuild.description = clusterName |
| 51 | print("Using context:\n" + COOKIECUTTER_TEMPLATE_CONTEXT) |
| 52 | |
| 53 | stage ('Download Cookiecutter template') { |
| 54 | def cookiecutterTemplateUrl = templateContext.default_context.cookiecutter_template_url |
| 55 | def cookiecutterTemplateBranch = templateContext.default_context.cookiecutter_template_branch |
| 56 | git.checkoutGitRepository(templateEnv, cookiecutterTemplateUrl, 'master') |
| 57 | // Use refspec if exists first of all |
| 58 | if (cookiecutterTemplateBranch.toString().startsWith('refs/')) { |
| 59 | dir(templateEnv) { |
| 60 | ssh.agentSh("git fetch ${cookiecutterTemplateUrl} ${cookiecutterTemplateBranch} && git checkout FETCH_HEAD") |
| 61 | } |
| 62 | } else { |
| 63 | // Use mcpVersion git tag if not specified branch for cookiecutter-templates |
| 64 | if (cookiecutterTemplateBranch == '') { |
| 65 | cookiecutterTemplateBranch = mcpVersion |
| 66 | // Don't have nightly/testing/stable for cookiecutter-templates repo, therefore use master |
| 67 | if(mcpVersion == "nightly" || mcpVersion == "testing" || mcpVersion == "stable"){ |
| 68 | cookiecutterTemplateBranch = 'master' |
Tomáš Kukrál | a3f4ba7 | 2017-08-03 15:40:22 +0200 | [diff] [blame] | 69 | } |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 70 | } |
| 71 | git.changeGitBranch(templateEnv, cookiecutterTemplateBranch) |
| 72 | } |
| 73 | } |
Tomáš Kukrál | a3f4ba7 | 2017-08-03 15:40:22 +0200 | [diff] [blame] | 74 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 75 | stage ('Create empty reclass model') { |
| 76 | dir(path: modelEnv) { |
| 77 | sh "rm -rfv .git" |
| 78 | sh "git init" |
| 79 | ssh.agentSh("git submodule add ${sharedReclassUrl} 'classes/system'") |
| 80 | } |
Tomáš Kukrál | 0c6835d | 2017-07-18 16:00:27 +0200 | [diff] [blame] | 81 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 82 | def sharedReclassBranch = templateContext.default_context.shared_reclass_branch |
| 83 | // Use refspec if exists first of all |
| 84 | if (sharedReclassBranch.toString().startsWith('refs/')) { |
| 85 | dir(systemEnv) { |
| 86 | ssh.agentSh("git fetch ${sharedReclassUrl} ${sharedReclassBranch} && git checkout FETCH_HEAD") |
| 87 | } |
| 88 | } else { |
| 89 | // Use mcpVersion git tag if not specified branch for reclass-system |
| 90 | if (sharedReclassBranch == '') { |
| 91 | sharedReclassBranch = mcpVersion |
| 92 | // Don't have nightly/testing/stable for reclass-system repo, therefore use master |
| 93 | if(mcpVersion == "nightly" || mcpVersion == "testing" || mcpVersion == "stable"){ |
| 94 | sharedReclassBranch = 'master' |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 95 | } |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 96 | } |
| 97 | git.changeGitBranch(systemEnv, sharedReclassBranch) |
| 98 | } |
| 99 | git.commitGitChanges(modelEnv, "Added new shared reclass submodule", "${user}@localhost", "${user}") |
| 100 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 101 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 102 | def productList = ["infra", "cicd", "opencontrail", "kubernetes", "openstack", "oss", "stacklight", "ceph"] |
| 103 | for (product in productList) { |
Richard Felkl | e77b091 | 2018-01-31 17:12:23 +0100 | [diff] [blame] | 104 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 105 | // get templateOutputDir and productDir |
| 106 | if (product.startsWith("stacklight")) { |
| 107 | templateOutputDir = "${env.WORKSPACE}/output/stacklight" |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 108 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 109 | def stacklightVersion |
| 110 | try { |
| 111 | stacklightVersion = templateContext.default_context['stacklight_version'] |
| 112 | } catch (Throwable e) { |
| 113 | common.warningMsg('Stacklight version loading failed') |
| 114 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 115 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 116 | if (stacklightVersion) { |
| 117 | productDir = "stacklight" + stacklightVersion |
| 118 | } else { |
| 119 | productDir = "stacklight1" |
| 120 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 121 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 122 | } else { |
| 123 | templateOutputDir = "${env.WORKSPACE}/output/${product}" |
| 124 | productDir = product |
| 125 | } |
Richard Felkl | 9543faa | 2018-01-11 09:47:35 +0100 | [diff] [blame] | 126 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 127 | if (product == "infra" || (templateContext.default_context["${product}_enabled"] |
| 128 | && templateContext.default_context["${product}_enabled"].toBoolean())) { |
Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 129 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 130 | templateDir = "${templateEnv}/cluster_product/${productDir}" |
| 131 | common.infoMsg("Generating product " + product + " from " + templateDir + " to " + templateOutputDir) |
Tomáš Kukrál | a3f4ba7 | 2017-08-03 15:40:22 +0200 | [diff] [blame] | 132 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 133 | sh "rm -rf ${templateOutputDir} || true" |
| 134 | sh "mkdir -p ${templateOutputDir}" |
| 135 | sh "mkdir -p ${outputDestination}" |
Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 136 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 137 | python.setupCookiecutterVirtualenv(cutterEnv) |
| 138 | python.buildCookiecutterTemplate(templateDir, COOKIECUTTER_TEMPLATE_CONTEXT, templateOutputDir, cutterEnv, templateBaseDir) |
| 139 | sh "mv -v ${templateOutputDir}/${clusterName}/* ${outputDestination}" |
| 140 | } else { |
| 141 | common.warningMsg("Product " + product + " is disabled") |
| 142 | } |
| 143 | } |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 144 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 145 | if(localRepositories && !offlineDeployment){ |
| 146 | def aptlyModelUrl = templateContext.default_context.local_model_url |
| 147 | dir(path: modelEnv) { |
| 148 | ssh.agentSh "git submodule add \"${aptlyModelUrl}\" \"classes/cluster/${clusterName}/cicd/aptly\"" |
| 149 | if(!(mcpVersion in ["nightly", "testing", "stable"])){ |
| 150 | ssh.agentSh "cd \"classes/cluster/${clusterName}/cicd/aptly\";git fetch --tags;git checkout ${mcpVersion}" |
| 151 | } |
| 152 | } |
| 153 | } |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 154 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 155 | stage('Generate new SaltMaster node') { |
| 156 | def nodeFile = "${modelEnv}/nodes/${saltMaster}.${clusterDomain}.yml" |
| 157 | def nodeString = """classes: |
Leontii Istomin | 56b6b11 | 2018-01-15 12:14:24 +0300 | [diff] [blame] | 158 | - cluster.${clusterName}.infra.config |
| 159 | parameters: |
| 160 | _param: |
| 161 | linux_system_codename: xenial |
| 162 | reclass_data_revision: master |
| 163 | linux: |
| 164 | system: |
| 165 | name: ${saltMaster} |
| 166 | domain: ${clusterDomain} |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 167 | """ |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 168 | sh "mkdir -p ${modelEnv}/nodes/" |
| 169 | writeFile(file: nodeFile, text: nodeString) |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 170 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 171 | git.commitGitChanges(modelEnv, "Create model ${clusterName}", "${user}@localhost", "${user}") |
| 172 | } |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 173 | |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 174 | stage("Test") { |
| 175 | if (TEST_MODEL.toBoolean() && sharedReclassUrl != '') { |
| 176 | def testResult = false |
| 177 | sh("cp -r ${modelEnv} ${testEnv}") |
| 178 | def DockerCName = "${env.JOB_NAME.toLowerCase()}_${env.BUILD_TAG.toLowerCase()}" |
| 179 | testResult = saltModelTesting.setupAndTestNode( |
| 180 | "${saltMaster}.${clusterDomain}", |
| 181 | "", |
| 182 | "", |
| 183 | testEnv, |
| 184 | 'pkg', |
| 185 | 'stable', |
Vasyl Saienko | 772e123 | 2018-07-23 14:42:24 +0300 | [diff] [blame] | 186 | reclassVersion, |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 187 | 0, |
| 188 | false, |
| 189 | false, |
| 190 | '', |
| 191 | '', |
| 192 | DockerCName) |
| 193 | if (testResult) { |
| 194 | common.infoMsg("Test finished: SUCCESS") |
| 195 | } else { |
| 196 | common.infoMsg('Test finished: FAILURE') |
| 197 | throw new RuntimeException('Test stage finished: FAILURE') |
azvyagintsev | 7c4a3cf | 2018-07-08 08:43:33 +0300 | [diff] [blame] | 198 | } |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 199 | } else { |
| 200 | common.warningMsg("Test stage has been skipped!") |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 201 | } |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 202 | } |
| 203 | stage("Generate config drives") { |
| 204 | // apt package genisoimage is required for this stage |
| 205 | |
| 206 | // download create-config-drive |
| 207 | // FIXME: that should be refactored, to use git clone - to be able download it from custom repo. |
| 208 | def mcpCommonScriptsBranch = templateContext.default_context.mcp_common_scripts_branch |
| 209 | if (mcpCommonScriptsBranch == '') { |
| 210 | mcpCommonScriptsBranch = mcpVersion |
| 211 | // Don't have nightly for mcp-common-scripts repo, therefore use master |
| 212 | if(mcpVersion == "nightly"){ |
| 213 | mcpCommonScriptsBranch = 'master' |
| 214 | } |
| 215 | } |
| 216 | def config_drive_script_url = "https://raw.githubusercontent.com/Mirantis/mcp-common-scripts/${mcpCommonScriptsBranch}/config-drive/create_config_drive.sh" |
| 217 | def user_data_script_url = "https://raw.githubusercontent.com/Mirantis/mcp-common-scripts/${mcpCommonScriptsBranch}/config-drive/master_config.sh" |
| 218 | |
| 219 | sh "wget -O create-config-drive ${config_drive_script_url} && chmod +x create-config-drive" |
| 220 | sh "wget -O user_data.sh ${user_data_script_url}" |
| 221 | |
| 222 | sh "git clone --mirror https://github.com/Mirantis/mk-pipelines.git ${pipelineEnv}/mk-pipelines" |
| 223 | sh "git clone --mirror https://github.com/Mirantis/pipeline-library.git ${pipelineEnv}/pipeline-library" |
| 224 | args = "--user-data user_data.sh --hostname ${saltMaster} --model ${modelEnv} --mk-pipelines ${pipelineEnv}/mk-pipelines/ --pipeline-library ${pipelineEnv}/pipeline-library/ ${saltMaster}.${clusterDomain}-config.iso" |
| 225 | |
| 226 | // load data from model |
| 227 | def smc = [:] |
| 228 | smc['SALT_MASTER_MINION_ID'] = "${saltMaster}.${clusterDomain}" |
| 229 | smc['SALT_MASTER_DEPLOY_IP'] = templateContext['default_context']['salt_master_management_address'] |
| 230 | smc['DEPLOY_NETWORK_GW'] = templateContext['default_context']['deploy_network_gateway'] |
| 231 | smc['DEPLOY_NETWORK_NETMASK'] = templateContext['default_context']['deploy_network_netmask'] |
| 232 | smc['DNS_SERVERS'] = templateContext['default_context']['dns_server01'] |
| 233 | smc['MCP_VERSION'] = "${mcpVersion}" |
| 234 | if (templateContext['default_context']['local_repositories'] == 'True'){ |
| 235 | def localRepoIP = templateContext['default_context']['local_repo_url'] |
| 236 | smc['MCP_SALT_REPO_KEY'] = "http://${localRepoIP}/public.gpg" |
| 237 | smc['MCP_SALT_REPO_URL'] = "http://${localRepoIP}/ubuntu-xenial" |
| 238 | smc['PIPELINES_FROM_ISO'] = 'false' |
| 239 | smc['PIPELINE_REPO_URL'] = "http://${localRepoIP}:8088" |
| 240 | smc['LOCAL_REPOS'] = 'true' |
| 241 | } |
| 242 | if (templateContext['default_context']['upstream_proxy_enabled'] == 'True'){ |
| 243 | if (templateContext['default_context']['upstream_proxy_auth_enabled'] == 'True'){ |
| 244 | smc['http_proxy'] = 'http://' + templateContext['default_context']['upstream_proxy_user'] + ':' + templateContext['default_context']['upstream_proxy_password'] + '@' + templateContext['default_context']['upstream_proxy_address'] + ':' + templateContext['default_context']['upstream_proxy_port'] |
| 245 | smc['https_proxy'] = 'http://' + templateContext['default_context']['upstream_proxy_user'] + ':' + templateContext['default_context']['upstream_proxy_password'] + '@' + templateContext['default_context']['upstream_proxy_address'] + ':' + templateContext['default_context']['upstream_proxy_port'] |
| 246 | } else { |
| 247 | smc['http_proxy'] = 'http://' + templateContext['default_context']['upstream_proxy_address'] + ':' + templateContext['default_context']['upstream_proxy_port'] |
| 248 | smc['https_proxy'] = 'http://' + templateContext['default_context']['upstream_proxy_address'] + ':' + templateContext['default_context']['upstream_proxy_port'] |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | for (i in common.entries(smc)) { |
| 253 | sh "sed -i 's,export ${i[0]}=.*,export ${i[0]}=${i[1]},' user_data.sh" |
| 254 | } |
| 255 | |
| 256 | // create cfg config-drive |
| 257 | sh "./create-config-drive ${args}" |
| 258 | sh("mkdir output-${clusterName} && mv ${saltMaster}.${clusterDomain}-config.iso output-${clusterName}/") |
| 259 | |
| 260 | // save cfg iso to artifacts |
| 261 | archiveArtifacts artifacts: "output-${clusterName}/${saltMaster}.${clusterDomain}-config.iso" |
| 262 | |
| 263 | if (templateContext['default_context']['local_repositories'] == 'True'){ |
| 264 | def aptlyServerHostname = templateContext.default_context.aptly_server_hostname |
| 265 | def user_data_script_apt_url = "https://raw.githubusercontent.com/Mirantis/mcp-common-scripts/master/config-drive/mirror_config.sh" |
| 266 | sh "wget -O mirror_config.sh ${user_data_script_apt_url}" |
| 267 | |
| 268 | def smc_apt = [:] |
| 269 | smc_apt['SALT_MASTER_DEPLOY_IP'] = templateContext['default_context']['salt_master_management_address'] |
| 270 | smc_apt['APTLY_DEPLOY_IP'] = templateContext['default_context']['aptly_server_deploy_address'] |
| 271 | smc_apt['APTLY_DEPLOY_NETMASK'] = templateContext['default_context']['deploy_network_netmask'] |
| 272 | smc_apt['APTLY_MINION_ID'] = "${aptlyServerHostname}.${clusterDomain}" |
| 273 | |
| 274 | for (i in common.entries(smc_apt)) { |
| 275 | sh "sed -i \"s,export ${i[0]}=.*,export ${i[0]}=${i[1]},\" mirror_config.sh" |
| 276 | } |
| 277 | |
| 278 | // create apt config-drive |
| 279 | sh "./create-config-drive --user-data mirror_config.sh --hostname ${aptlyServerHostname} ${aptlyServerHostname}.${clusterDomain}-config.iso" |
| 280 | sh("mv ${aptlyServerHostname}.${clusterDomain}-config.iso output-${clusterName}/") |
| 281 | |
| 282 | // save apt iso to artifacts |
| 283 | archiveArtifacts artifacts: "output-${clusterName}/${aptlyServerHostname}.${clusterDomain}-config.iso" |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | stage ('Save changes reclass model') { |
| 288 | sh(returnStatus: true, script: "tar -zcf output-${clusterName}/${clusterName}.tar.gz -C ${modelEnv} .") |
| 289 | archiveArtifacts artifacts: "output-${clusterName}/${clusterName}.tar.gz" |
| 290 | |
| 291 | |
| 292 | if (EMAIL_ADDRESS != null && EMAIL_ADDRESS != "") { |
| 293 | emailext(to: EMAIL_ADDRESS, |
| 294 | attachmentsPattern: "output-${clusterName}/*", |
| 295 | body: "Mirantis Jenkins\n\nRequested reclass model ${clusterName} has been created and attached to this email.\nEnjoy!\n\nMirantis", |
| 296 | subject: "Your Salt model ${clusterName}") |
| 297 | } |
| 298 | dir("output-${clusterName}"){ |
| 299 | deleteDir() |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | } catch (Throwable e) { |
| 304 | // If there was an error or exception thrown, the build failed |
| 305 | currentBuild.result = "FAILURE" |
| 306 | currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message |
| 307 | throw e |
| 308 | } finally { |
| 309 | stage ('Clean workspace directories') { |
| 310 | sh(returnStatus: true, script: "rm -rf ${templateEnv}") |
| 311 | sh(returnStatus: true, script: "rm -rf ${modelEnv}") |
| 312 | sh(returnStatus: true, script: "rm -rf ${pipelineEnv}") |
| 313 | } |
| 314 | // common.sendNotification(currentBuild.result,"",["slack"]) |
Tomáš Kukrál | 7ded364 | 2017-03-27 15:52:51 +0200 | [diff] [blame] | 315 | } |
azvyagintsev | 3ed704f | 2018-07-09 15:49:27 +0300 | [diff] [blame] | 316 | } |
Mikhail Ivanov | 9f81292 | 2017-11-07 18:52:02 +0400 | [diff] [blame] | 317 | } |