[iec] seba-on-arm: Installer/OS specific params
[ci-management.git] / jjb / iec / iec.yaml
1 ---
2 - project:
3     name: 'iec'
4     project-name: 'iec'
5     project: '{project-name}'
6     views:
7       - project-view
8     # -------------------------------
9     # BRANCH DEFINITIONS
10     # -------------------------------
11     stream:
12       - master:
13           branch: '{stream}'
14           gs-pathname: ''
15           disabled: false
16
17     # -------------------------------
18     # INSTALLER DEFINITIONS
19     # -------------------------------
20     installer:
21       - fuel
22       - compass
23
24     # -------------------------------
25     # OPERATING SYSTEM DEFINITIONS
26     # -------------------------------
27     os:
28       - ubuntu1604
29       - ubuntu1804
30       - centos7
31
32     # -------------------------------
33     # DEPLOY TYPE DEFINITIONS
34     # -------------------------------
35     deploy_type:
36       - baremetal:
37           slave-label: 'aarch64_dev'
38           scenario: 'k8-calico-iec-noha'
39       - virtual:
40           slave-label: 'aarch64_dev'
41           scenario: 'k8-calico-iec-noha'
42
43     exclude:
44       # Compass does not run against baremetal PODs yet
45       - installer: compass
46         deploy_type: baremetal
47       - installer: compass
48         os: centos7
49       - installer: compass
50         os: ubuntu1804
51
52     # -------------------------------
53     # USECASE DEFINITIONS
54     # -------------------------------
55     usecase:
56       - seba_on_arm:
57           slave-label: 'aarch64_dev'
58           scenario: 'k8-calico-iec-noha'
59
60     jobs:
61       - 'iec-{installer}-{deploy_type}-{os}-daily-{stream}'
62       - 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
63       - 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
64       - 'iec-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
65
66 ##############
67 # PARAMETERS #
68 ##############
69 - parameter:
70     name: 'iec-defaults'
71     parameters:
72       - string:
73           name: INSTALLER_IP
74           default: '10.20.0.2'
75           description: 'IP of the installer'
76       - string:
77           name: SSH_KEY
78           default: '/var/lib/opnfv/mcp.rsa'
79           description: 'Path to private SSH key to access environment nodes'
80       - string:
81           name: EXTERNAL_NETWORK
82           default: 'floating_net'
83           description: 'external network for test'
84       - string:
85           name: CI_DEBUG
86           default: 'false'
87           description: 'Show debug output information'
88       - string:
89           name: ARCHIVE_ARTIFACTS
90           default: '**/*.log'
91           description: Artifacts to archive to the logs server.
92 # Usecase params are both installer and OS specific
93 - parameter: &k8s_fuel_ubuntu1604_parameter
94     name: 'seba_on_arm-fuel-ubuntu1604-defaults'
95     parameters:
96       - string: &k8s_master_ip
97           name: K8S_MASTER_IP
98           default: ''
99           description: 'IP address to connect to the K8s master'
100       - string: &k8s_ssh_user
101           name: K8S_SSH_USER
102           default: 'ubuntu'
103           description: 'SSH username to connect to the K8s master '
104       - string: &k8s_ssh_password
105           name: K8S_SSH_PASSWORD
106           default: ''
107           description: 'SSH password to connect to the K8s master'
108       - string: &k8s_ssh_key
109           name: K8S_SSH_KEY
110           default: ''
111           description: 'SSH key to connect to the K8s master'
112 - parameter:
113     <<: *k8s_fuel_ubuntu1604_parameter
114     name: 'seba_on_arm-fuel-ubuntu1804-defaults'
115 - parameter:
116     name: 'seba_on_arm-fuel-centos7-defaults'
117     parameters:
118       - string:
119           <<: *k8s_master_ip
120       - string:
121           <<: *k8s_ssh_user
122           default: 'centos'
123       - string:
124           <<: *k8s_ssh_password
125       - string:
126           <<: *k8s_ssh_key
127 - parameter:
128     name: 'seba_on_arm-compass-ubuntu1604-defaults'
129     parameters:
130       - string:
131           <<: *k8s_master_ip
132           default: '10.1.0.50'
133       - string:
134           <<: *k8s_ssh_user
135           default: 'root'
136       - string:
137           <<: *k8s_ssh_password
138           default: 'root'
139       - string:
140           <<: *k8s_ssh_key
141
142 ########################
143 # job templates
144 ########################
145 - job-template:
146     name: 'iec-{installer}-{deploy_type}-{os}-daily-{stream}'
147     disabled: '{obj:disabled}'
148     concurrent: false
149     node: '{slave-label}'
150     properties:
151       - throttle:
152           enabled: true
153           max-total: 4
154           max-per-node: 1
155           option: 'project'
156       - build-blocker:
157           use-build-blocker: true
158           blocking-jobs:
159             - '.*-fuel-{deploy_type}-.*'
160             - '.*-compass-{deploy_type}-.*'
161           blocking-level: 'NODE'
162
163     wrappers:
164       - build-name:
165           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
166
167     triggers:
168       - 'iec-{installer}-{deploy_type}-{os}-daily-{stream}-trigger'
169
170     parameters:
171       - lf-infra-parameters:
172           project: '{project}'
173           stream: '{stream}'
174           branch: '{branch}'
175       - '{project}-defaults'
176       - string:
177           name: DEPLOY_SCENARIO
178           default: '{scenario}'
179
180     builders:
181       - trigger-builds:
182           - project: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
183             current-parameters: false
184             predefined-parameters:
185               DEPLOY_SCENARIO={scenario}
186             same-node: true
187             block: true
188           - project:
189               !j2: |
190                 {%- for uc in usecase -%}
191                 iec-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }}
192                 {%- if not loop.last -%},{%- endif -%}
193                 {%- endfor %}
194             current-parameters: false
195             same-node: true
196             block: true
197             block-thresholds:
198               build-step-failure-threshold: 'never'
199               failure-threshold: 'never'
200               unstable-threshold: 'FAILURE'
201           - project: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
202             current-parameters: false
203             predefined-parameters:
204               DEPLOY_SCENARIO={scenario}
205             same-node: true
206             block: true
207
208 - job-template:
209     name: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
210     concurrent: true
211     node: '{slave-label}'
212     properties: &properties
213       - throttle:
214           enabled: true
215           max-total: 4
216           max-per-node: 1
217           option: 'project'
218       - build-blocker:
219           use-build-blocker: true
220           blocking-jobs:
221             - '.*-deploy-{installer}-{deploy_type}-.*'
222             - '.*-destroy-{installer}-{deploy_type}-.*'
223             - '.*-install-.*-{installer}-{deploy_type}-.*'
224           blocking-level: 'NODE'
225
226     parameters:
227       - lf-infra-parameters:
228           project: '{project}'
229           stream: '{stream}'
230           branch: '{branch}'
231       - '{project}-defaults'
232       - string:
233           name: DEPLOY_SCENARIO
234           default: '{scenario}'
235       - string:
236           name: EXTRA_ARGS
237           default: '-o {os}'
238
239     wrappers: &wrappers
240       - build-name:
241           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
242
243     scm: &scm
244       - git:
245           credentials-id: '{jenkins-ssh-credential}'
246           url: '{git-url}/{project}.git'
247           refspec: ''
248           branches:
249             - 'refs/heads/{branch}'
250           skip-tag: true
251           wipe-workspace: true
252           submodule:
253             disable: true
254             recursive: false
255             timeout: '{submodule-timeout}'
256           choosing-strategy: default
257
258     builders:
259       - description-setter:
260           description: "POD: $NODE_NAME"
261       - conditional-step:
262           condition-kind: regex-match
263           regex: 'compass'
264           label: '{installer}'
265           steps:
266             - shell:
267                 !include-raw-escape: ./iec-compass-build.sh
268             - shell:
269                 !include-raw-escape: ./iec-compass-deploy.sh
270             - shell:
271                 !include-raw-escape: ./iec-fdn-install.sh
272       - conditional-step:
273           condition-kind: regex-match
274           regex: 'fuel'
275           label: '{installer}'
276           steps:
277             - shell:
278                 !include-raw-escape: ./iec-fuel-deploy.sh
279
280     publishers: &publishers
281       - email:
282           recipients: armband@enea.com
283       - lf-infra-publish
284
285 - job-template:
286     name: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
287     concurrent: true
288     node: '{slave-label}'
289     properties: *properties
290     parameters:
291       - lf-infra-parameters:
292           project: '{project}'
293           stream: '{stream}'
294           branch: '{branch}'
295       - '{project}-defaults'
296       - string:
297           name: DEPLOY_SCENARIO
298           default: '{scenario}'
299       - string:
300           name: EXTRA_ARGS
301           default: '-EEE -o {os}'
302
303     wrappers: *wrappers
304     scm: *scm
305
306     builders:
307       - description-setter:
308           description: "POD: $NODE_NAME"
309       - shell:
310           !include-raw-escape: ./iec-{installer}-destroy.sh
311
312     publishers: *publishers
313
314 - job-template:
315     name: 'iec-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
316     concurrent: true
317     node: '{slave-label}'
318     properties: *properties
319
320     parameters:
321       - lf-infra-parameters:
322           project: '{project}'
323           stream: '{stream}'
324           branch: '{branch}'
325       - '{project}-defaults'
326       - '{usecase}-{installer}-{os}-defaults'
327
328     wrappers:
329       - build-name:
330           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${installer}-${deploy_type}'
331
332     scm: *scm
333
334     builders:
335       - shell:
336           !include-raw-escape: ./iec-{usecase}.sh
337
338     publishers: *publishers
339
340 ########################
341 # trigger macros
342 ########################
343 # CI PODs
344 # ----------------------------------------------------------------
345 # Akraino IEC CI Baremetal Triggers running against master branch
346 # ----------------------------------------------------------------
347 - trigger:
348     name: 'iec-fuel-virtual-ubuntu1604-daily-master-trigger'
349     triggers:
350       - timed: '0 1 * * 1,3,5'
351 - trigger:
352     name: 'iec-fuel-baremetal-ubuntu1604-daily-master-trigger'
353     triggers:
354       - timed: ''
355 - trigger:
356     name: 'iec-compass-virtual-ubuntu1604-daily-master-trigger'
357     triggers:
358       - timed: '0 13 * * *'
359 - trigger:
360     name: 'iec-fuel-virtual-ubuntu1804-daily-master-trigger'
361     triggers:
362       - timed: '0 1 * * 2,6'
363 - trigger:
364     name: 'iec-fuel-baremetal-ubuntu1804-daily-master-trigger'
365     triggers:
366       - timed: ''
367 - trigger:
368     name: 'iec-fuel-virtual-centos7-daily-master-trigger'
369     triggers:
370       - timed: '0 1 * * 4,7'
371 - trigger:
372     name: 'iec-fuel-baremetal-centos7-daily-master-trigger'
373     triggers:
374       - timed: ''