blob: 79695b45c17cdfba3d6a9ca26a205781cc017b8e [file] [log] [blame]
Anna Arhipovad2ced492022-09-28 10:02:56 +02001- job-template:
2 project-type: freestyle
3 description: -|
4 {job-description}
5 WARNING! models are pushed to the same LAB_CONTEXT_NAME repositories under the specified tags!
6 Fuel-devops environment is erased after the build by default
7 concurrent: true
8 disabled: false
9 name: swarm-cookied-model-generator
10 parameters:
11 - string:
12 default: ''
13 description: 'This name will be used:
14 - to find the template file tcp_tests/templates/cookied-model-generator/salt_$LAB_CONTEXT_NAME.yaml
15 - to set the salt model cluster name'
16 name: LAB_CONTEXT_NAME
17 trim: 'false'
18 - string:
19 default: ''
20 description: 'Cluster name wich will be used for model creation
21Default: LAB_CONFIG_NAME'
22 name: CLUSTER_NAME
23 trim: 'false'
24 - string:
25 default: ''
26 description: 'Domain name wich will be used for model creation
27Default: LAB_CONFIG_NAME.local'
28 name: DOMAIN_NAME
29 trim: 'false'
30 - string:
31 default: 'proposed'
32 description: ''
33 name: REPOSITORY_SUITE
34 trim: 'false'
35 - string:
36 default: 'proposed'
37 description: ''
38 name: SALT_MODELS_SYSTEM_COMMIT
39 trim: 'false'
40 - string:
41 default: 'proposed'
42 description: ''
43 name: COOKIECUTTER_TEMPLATE_COMMIT
44 trim: 'false'
45 - string:
46 default: ''
47 description: ''
48 name: JENKINS_PIPELINE_BRANCH
49 trim: 'false'
50 - string:
51 default: ''
52 description: ''
53 name: SALT_MODELS_SYSTEM_REF_CHANGE
54 trim: 'false'
55 - string:
56 default: 'sre-team-infra'
57 description: ''
58 name: NODE_NAME
59 trim: 'false'
60 - string:
61 default: ''
62 description: ''
63 name: TCP_QA_REFS
64 - string:
65 default: ''
66 description: 'environment-templates repository ref change'
67 name: ENVIRONMENT_TEMPLATE_REF_CHANGE
68 trim: 'false'
69 - string:
70 default: false
71 description: cookiecutter-templates repository ref change
72 name: COOKIECUTTER_REF_CHANGE
73 - bool:
74 default: true
75 description: ''
76 name: ERASE_EXISTING_ENVIRONMENT
77 - bool:
78 default: true
79 description: ''
80 name: SHUTDOWN_ENV_ON_TEARDOWN
81 - bool:
82 default: true
83 description: ''
84 name: ERASE_ENVIRONMENT_AFTER_BUILD
85 - string:
86 default: '192.168.10.0/24'
87 description: 'Management (admin/PXE) network. For now /24 only.'
88 name: IPV4_NET_ADMIN
89 trim: 'false'
90 - string:
91 default: '172.16.10.0/24'
92 description: 'Control (internal cluster communications) network. For now /24 only.'
93 name: IPV4_NET_CONTROL
94 trim: 'false'
95 - string:
96 default: '10.1.0.0/24'
97 description: 'OpenStack tenant (transport for user-defined internal networks for instances) network. For now /24 only.'
98 name: IPV4_NET_TENANT
99 trim: 'false'
100 - string:
101 default: '10.16.0.0/24'
102 description: 'OpenStack external network (for incoming connections with floating IPs). For now /24 only.'
103 name: IPV4_NET_EXTERNAL
104 trim: 'false'
105 - string:
106 default: '/home/jenkins/images/cfg01-day01.qcow2'
107 description: 'Image used for the model generation and validation'
108 name: IMAGE_PATH_CFG01_DAY01
109 trim: 'false'
110 - string:
111 default: ''
112 description: ''
113 name: UPDATE_REPO_CUSTOM_TAG
114 trim: 'false'
115 - string:
116 default: ''
117 description: ''
118 name: UPDATE_VERSION
119 trim: 'false'
120 - string:
121 default: ''
122 description: ''
123 name: DEPLOY_NETWORK_NETMASK
124 trim: 'false'
125 logrotate:
126 daysToKeep: 365
127 scm:
128 - git:
129 branches:
130 - FETCH_HEAD
131 refspec: '${{TCP_QA_REFS}}'
132 url: https://gerrit.mcp.mirantis.com/mcp/tcp-qa
133 wrappers:
134 - inject:
135 properties-content: |-
136 VENV_PATH=/home/jenkins/fuel-devops30
137 ENV_NAME=swarm_model_$BUILD_NUMBER
138 LAB_CONFIG_NAME=cookied-model-generator
139
140 SALT_STEPS_PATH=templates/$LAB_CONFIG_NAME/salt_$LAB_CONTEXT_NAME.yaml
141
142 TEST_GROUP=test_generate_model
143 #STORAGE_POOL_NAME=second_pool
144 PYTHONIOENCODING=UTF-8
145 MAKE_SNAPSHOT_STAGES=false
146 DEVOPS_LOCK_FILE=/run/lock/devops_lock
147 - credentials-binding:
148 - ssh-user-private-key:
149 credential-id: f4fb9dd6-ba63-4085-82f7-3fa601334d95
150 key-file-variable: COOKIECUTTER_TEMPLATES_REPOSITORY_KEY_PATH
151 builders:
152 - shell: "chmod +x jobs/pipelines/cookied-model-generator.sh"
153 - shell: "./jobs/pipelines/cookied-model-generator.sh"
154 publishers:
155 - archive:
156 artifacts: 'tcp_tests/*.log,tcp_tests/*.tar.gz,tcp_tests/*.xml'
157 allow-empty: false
158 - post-tasks:
159 - run-if-job-successful: false
160 matches:
161 # Small hack to start post-tasks every time after build
162 - log-text: test session starts
163 - operator: OR
164 script: " . $VENV_PATH/bin/activate;
165 if [ $SHUTDOWN_ENV_ON_TEARDOWN = 'true' ]; then
166 dos.py destroy $ENV_NAME || true;
167 fi;
168
169 if [ $ERASE_ENVIRONMENT_AFTER_BUILD = 'true' ]; then
170 dos.py erase $ENV_NAME || true;
171 fi;"