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