blob: 3a82388761c876f2118c57ad9b4f3e22e692bfac [file] [log] [blame]
Vladimir Khlyuneva66f4102023-07-10 14:35:48 +04001/*
2* DEPLOY_EMPTY_NODE Add extra node to heat stack. Node without a role and with salt-minion
3*/
4
5@Library('tcp-qa')_
6
7def common = new com.mirantis.mk.Common()
8def shared = new com.mirantis.system_qa.SharedPipeline()
9
10def batch_size = env.BATCH_SIZE ?: ''
11def dist_upgrade_nodes = "${env.DIST_UPGRADE_NODES}" != "false" ? true : false
12env.LAB_CONFIG_NAME = 'cookied-model-generator'
13
14timeout(time: 23, unit: 'HOURS') {
15 node ("${NODE_NAME}") {
16 env.slave_workdir = pwd()
17
18 def inject_env_vars = [
19 'VENV_PATH=/home/jenkins/fuel-devops30',
20 "ENV_NAME=swarm_model_${BUILD_NUMBER}",
21 'LAB_CONFIG_NAME=cookied-model-generator',
22 "SALT_STEPS_PATH=templates/${LAB_CONFIG_NAME}/salt_${LAB_CONTEXT_NAME}.yaml",
23 'TEST_GROUP=test_generate_model',
24 'PYTHONIOENCODING=UTF-8',
25 'MAKE_SNAPSHOT_STAGES=false',
26 'DEVOPS_LOCK_FILE=/run/lock/devops_lock',
27 ]
28
29 withEnv(inject_env_vars) {
30 try {
31 checkout scm
32 sshagent(credentials: ['f4fb9dd6-ba63-4085-82f7-3fa601334d95']) {
33 sh "/bin/bash ./jobs/pipelines/cookied-model-generator.sh"
34 }
35 } finally {
36 dir("${env.slave_workdir }") {
37 archiveArtifacts artifacts: 'tcp_tests/*.log,tcp_tests/*.tar.gz,tcp_tests/*.xml'
38 venv_cmd = "source ${VENV_PATH}/bin/activate"
39 if (env.SHUTDOWN_ENV_ON_TEARDOWN.toBoolean()){
40 sh "${venv_cmd} && dos.py destroy ${ENV_NAME}"
41 }
42 if (env.ERASE_ENVIRONMENT_AFTER_BUILD.toBoolean()){
43 sh = "${venv_cmd} && dos.py erase ${ENV_NAME}"
44 }
45 }
46 } //try
47 } // withEnv
48 } // node
49} // timeout