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