[iec] view: Hide downstream projects
[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 - parameter:
95     name: 'seba_on_arm-defaults'
96     parameters:
97       - string:
98           name: K8S_SSH_USER
99           default: 'ubuntu'
100           description: 'SSH username to connect to the K8s master '
101       - string:
102           name: K8S_SSH_PASSWORD
103           default: ''
104           description: 'SSH password to connect to the K8s master'
105       - string:
106           name: K8S_SSH_KEY
107           default: ''
108           description: 'SSH key to connect to the K8s master'
109       - string:
110           name: K8S_MASTER_IP_COMPASS
111           default: '10.1.0.50'
112           description: 'IP address to compass connect to the K8s master'
113       - string:
114           name: K8S_SSH_PASSWORD_COMPASS
115           default: 'root'
116           description: 'SSH password to compass connect to the K8s master'
117       - string:
118           name: K8S_SSH_USER_COMPASS
119           default: 'root'
120           description: 'SSH username to compass connect to the K8s master'
121
122 ########################
123 # job templates
124 ########################
125 - job-template:
126     name: 'iec-{installer}-{deploy_type}-{os}-daily-{stream}'
127     disabled: '{obj:disabled}'
128     concurrent: false
129     node: '{slave-label}'
130     properties:
131       - throttle:
132           enabled: true
133           max-total: 4
134           max-per-node: 1
135           option: 'project'
136       - build-blocker:
137           use-build-blocker: true
138           blocking-jobs:
139             - '.*-fuel-{deploy_type}-.*'
140             - '.*-compass-{deploy_type}-.*'
141           blocking-level: 'NODE'
142
143     wrappers:
144       - build-name:
145           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
146
147     triggers:
148       - 'iec-{installer}-{deploy_type}-{os}-daily-{stream}-trigger'
149
150     parameters:
151       - lf-infra-parameters:
152           project: '{project}'
153           stream: '{stream}'
154           branch: '{branch}'
155       - '{project}-defaults'
156       - string:
157           name: DEPLOY_SCENARIO
158           default: '{scenario}'
159
160     builders:
161       - trigger-builds:
162           - project: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
163             current-parameters: false
164             predefined-parameters:
165               DEPLOY_SCENARIO={scenario}
166             same-node: true
167             block: true
168           - project:
169               !j2: |
170                 {%- for uc in usecase -%}
171                 iec-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }}
172                 {%- if not loop.last -%},{%- endif -%}
173                 {%- endfor %}
174             current-parameters: false
175             same-node: true
176             block: true
177             block-thresholds:
178               build-step-failure-threshold: 'never'
179               failure-threshold: 'never'
180               unstable-threshold: 'FAILURE'
181           - project: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
182             current-parameters: false
183             predefined-parameters:
184               DEPLOY_SCENARIO={scenario}
185             same-node: true
186             block: true
187
188 - job-template:
189     name: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
190     concurrent: true
191     node: '{slave-label}'
192     properties: &properties
193       - throttle:
194           enabled: true
195           max-total: 4
196           max-per-node: 1
197           option: 'project'
198       - build-blocker:
199           use-build-blocker: true
200           blocking-jobs:
201             - '.*-deploy-{installer}-{deploy_type}-.*'
202             - '.*-destroy-{installer}-{deploy_type}-.*'
203             - '.*-install-.*-{installer}-{deploy_type}-.*'
204           blocking-level: 'NODE'
205
206     parameters:
207       - lf-infra-parameters:
208           project: '{project}'
209           stream: '{stream}'
210           branch: '{branch}'
211       - '{project}-defaults'
212       - string:
213           name: DEPLOY_SCENARIO
214           default: '{scenario}'
215       - string:
216           name: EXTRA_ARGS
217           default: '-o {os}'
218
219     wrappers: &wrappers
220       - build-name:
221           name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
222
223     scm: &scm
224       - git:
225           credentials-id: '{jenkins-ssh-credential}'
226           url: '{git-url}/{project}.git'
227           refspec: ''
228           branches:
229             - 'refs/heads/{branch}'
230           skip-tag: true
231           wipe-workspace: true
232           submodule:
233             disable: true
234             recursive: false
235             timeout: '{submodule-timeout}'
236           choosing-strategy: default
237
238     builders:
239       - description-setter:
240           description: "POD: $NODE_NAME"
241       - conditional-step:
242           condition-kind: regex-match
243           regex: 'compass'
244           label: '{installer}'
245           steps:
246             - shell:
247                 !include-raw-escape: ./iec-compass-build.sh
248             - shell:
249                 !include-raw-escape: ./iec-compass-deploy.sh
250             - shell:
251                 !include-raw-escape: ./iec-fdn-install.sh
252       - conditional-step:
253           condition-kind: regex-match
254           regex: 'fuel'
255           label: '{installer}'
256           steps:
257             - shell:
258                 !include-raw-escape: ./iec-fuel-deploy.sh
259
260     publishers: &publishers
261       - email:
262           recipients: armband@enea.com
263       - lf-infra-publish
264
265 - job-template:
266     name: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
267     concurrent: true
268     node: '{slave-label}'
269     properties: *properties
270     parameters:
271       - lf-infra-parameters:
272           project: '{project}'
273           stream: '{stream}'
274           branch: '{branch}'
275       - '{project}-defaults'
276       - string:
277           name: DEPLOY_SCENARIO
278           default: '{scenario}'
279       - string:
280           name: EXTRA_ARGS
281           default: '-EEE -o {os}'
282
283     wrappers: *wrappers
284     scm: *scm
285
286     builders:
287       - description-setter:
288           description: "POD: $NODE_NAME"
289       - shell:
290           !include-raw-escape: ./iec-{installer}-destroy.sh
291
292     publishers: *publishers
293
294 - job-template:
295     name: 'iec-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
296     concurrent: true
297     node: '{slave-label}'
298     properties: *properties
299
300     parameters:
301       - lf-infra-parameters:
302           project: '{project}'
303           stream: '{stream}'
304           branch: '{branch}'
305       - '{project}-defaults'
306       - '{usecase}-defaults'
307
308     wrappers:
309       - build-name:
310           name: '$BUILD_NUMBER - Usecase: ${usecase} DeployType: ${installer}-${deploy_type}'
311
312     scm: *scm
313
314     builders:
315       - shell:
316           !include-raw-escape: ./iec-{usecase}.sh
317
318     publishers: *publishers
319
320 ########################
321 # trigger macros
322 ########################
323 # CI PODs
324 # ----------------------------------------------------------------
325 # Akraino IEC CI Baremetal Triggers running against master branch
326 # ----------------------------------------------------------------
327 - trigger:
328     name: 'iec-fuel-virtual-ubuntu1604-daily-master-trigger'
329     triggers:
330       - timed: '0 1 * * 1,3,5'
331 - trigger:
332     name: 'iec-fuel-baremetal-ubuntu1604-daily-master-trigger'
333     triggers:
334       - timed: ''
335 - trigger:
336     name: 'iec-compass-virtual-ubuntu1604-daily-master-trigger'
337     triggers:
338       - timed: '0 13 * * *'
339 - trigger:
340     name: 'iec-fuel-virtual-ubuntu1804-daily-master-trigger'
341     triggers:
342       - timed: '0 1 * * 2,6'
343 - trigger:
344     name: 'iec-fuel-baremetal-ubuntu1804-daily-master-trigger'
345     triggers:
346       - timed: ''
347 - trigger:
348     name: 'iec-fuel-virtual-centos7-daily-master-trigger'
349     triggers:
350       - timed: '0 1 * * 4,7'
351 - trigger:
352     name: 'iec-fuel-baremetal-centos7-daily-master-trigger'
353     triggers:
354       - timed: ''