Merge "Enable merge jobs to trigger downstream job"
[ci-management.git] / jjb / akraino-templates / akraino-jjb-kni.yaml
1 ---
2 #
3 # Copyright (c) 2019 Red Hat. All rights reserved.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License.
7 #
8 # You may obtain a copy of the License at
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 - job-template:
18     id: kni-installer-verify-installer
19     name: '{project-name}-verify-installer'
20
21     ######################
22     # Default parameters #
23     ######################
24
25     build-node: centos7-builder-2c-1g
26     build-days-to-keep: 30
27     build-timeout: 60
28     submodule-recursive: true
29
30     #####################
31     # Job Configuration #
32     #####################
33
34     project-type: freestyle
35     node: '{build-node}'
36
37     properties:
38       - lf-infra-properties:
39           build-days-to-keep: '{build-days-to-keep}'
40
41     parameters:
42       - lf-infra-parameters:
43           project: '{project}'
44           branch: '{branch}'
45           stream: '{stream}'
46           lftools-version: '{lftools-version}'
47
48     wrappers:
49       - lf-infra-wrappers:
50           build-timeout: '{build-timeout}'
51           jenkins-ssh-credential: '{jenkins-ssh-credential}'
52
53     gerrit_trigger_file_paths:
54       - compare-type: ANT
55         pattern: '**'
56
57     scm:
58       - lf-infra-gerrit-scm:
59           jenkins-ssh-credential: '{jenkins-ssh-credential}'
60           git-url: '{git-url}/{project}.git'
61           refspec: '$GERRIT_REFSPEC'
62           branch: '$GERRIT_BRANCH'
63           submodule-recursive: '{submodule-recursive}'
64           submodule-timeout: '{submodule-timeout}'
65           submodule-disable: false
66           choosing-strategy: default
67
68     gerrit_verify_triggers:
69       - patchset-created-event:
70           exclude-drafts: true
71           exclude-trivial-rebase: false
72           exclude-no-code-change: false
73       - draft-published-event
74       - comment-added-contains-event:
75           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
76
77     triggers:
78       - gerrit:
79           server-name: '{gerrit-server-name}'
80           trigger-on: '{obj:gerrit_verify_triggers}'
81           projects:
82             - project-compare-type: ANT
83               project-pattern: '{project}'
84               branches:
85                 - branch-compare-type: ANT
86                   branch-pattern: '**/{branch}'
87               file-paths: '{obj:gerrit_trigger_file_paths}'
88
89     builders:
90       - lf-infra-pre-build
91       - shell: !include-raw-escape:
92           - ../shell/install_go.sh
93       - shell: !include-raw-escape:
94           - ../shell/build_kni_installer.sh
95
96     publishers:
97       - lf-infra-publish
98
99 - job-template:
100     id: kni-installer-verify-binary
101     name: '{project-name}-verify-binary'
102
103     ######################
104     # Default parameters #
105     ######################
106
107     build-days-to-keep: 30
108     build-timeout: 60
109     build-node: centos7-builder-8c-8g
110     submodule-recursive: true
111
112     #####################
113     # Job Configuration #
114     #####################
115
116     project-type: freestyle
117     node: '{build-node}'
118
119     properties:
120       - lf-infra-properties:
121           build-days-to-keep: '{build-days-to-keep}'
122
123     parameters:
124       - lf-infra-parameters:
125           project: '{project}'
126           branch: '{branch}'
127           stream: '{stream}'
128           lftools-version: '{lftools-version}'
129
130     wrappers:
131       - lf-infra-wrappers:
132           build-timeout: '{build-timeout}'
133           jenkins-ssh-credential: '{jenkins-ssh-credential}'
134
135     gerrit_trigger_file_paths:
136       - compare-type: REG_EXP
137         pattern: 'Makefile'
138       - compare-type: REG_EXP
139         pattern: 'cmd/binary.go'
140
141     gerrit_verify_triggers:
142       - patchset-created-event:
143           execlude-drafts: true
144           exclude-trivial-rebase: false
145           exclude-no-code-change: false
146       - draft-published-event
147       - comment-added-contains-event:
148           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
149
150     scm:
151       - lf-infra-gerrit-scm:
152           jenkins-ssh-credential: '{jenkins-ssh-credential}'
153           git-url: '{git-url}/{project}.git'
154           refspec: '$GERRIT_REFSPEC'
155           branch: '$GERRIT_BRANCH'
156           submodule-recursive: '{submodule-recursive}'
157           submodule-timeout: '{submodule-timeout}'
158           submodule-disable: false
159           choosing-strategy: default
160
161     triggers:
162       - gerrit:
163           server-name: '{gerrit-server-name}'
164           trigger-on: '{obj:gerrit_verify_triggers}'
165           projects:
166             - project-compare-type: ANT
167               project-pattern: '{project}'
168               branches:
169                 - branch-compare-type: ANT
170                   branch-pattern: '**/{branch}'
171               file-paths: '{obj:gerrit_trigger_file_paths}'
172
173     builders:
174       - lf-infra-pre-build
175       - shell: !include-raw-escape:
176           - ../shell/install_go.sh
177       - shell: !include-raw-escape:
178           - ../shell/build_kni_binary.sh
179
180     publishers:
181       - lf-infra-publish
182
183 - job-template:
184     id: kni-blueprint-pae-verify-deploy-aws
185     name: '{project-name}-verify-deploy-aws'
186
187     ######################
188     # Default parameters #
189     ######################
190
191     build-days-to-keep: 30
192     build-timeout: 60
193     build-node: kni-libvirt
194     submodule-recursive: true
195
196     #####################
197     # Job Configuration #
198     #####################
199
200     project-type: freestyle
201     node: '{build-node}'
202
203     properties:
204       - lf-infra-properties:
205           build-days-to-keep: '{build-days-to-keep}'
206
207     archive-artifacts: >
208       **/*.log
209
210     parameters:
211       - lf-infra-parameters:
212           project: '{project}'
213           branch: '{branch}'
214           stream: '{stream}'
215           lftools-version: '{lftools-version}'
216       - string:
217           name: ARCHIVE_ARTIFACTS
218           default: '{archive-artifacts}'
219           description: Artifacts to archive to the logs server.
220
221     wrappers:
222       - lf-infra-wrappers:
223           build-timeout: '{build-timeout}'
224           jenkins-ssh-credential: '{jenkins-ssh-credential}'
225       - credentials-binding:
226           - ssh-user-private-key:
227               credential-id: kni-secrets
228               key-file-variable: KNI_KEY_PATH
229
230     gerrit_trigger_file_paths:
231       - compare-type: REG_EXP
232         pattern: 'profiles/production.aws/*'
233       - compare-type: REG_EXP
234         pattern: 'sites/testing.aws.edge-sites.net/*'
235
236     gerrit_verify_triggers:
237       - patchset-created-event:
238           exclude-drafts: true
239           exclude-trivial-rebase: false
240           exclude-no-code-change: false
241       - draft-published-event
242       - comment-added-contains-event:
243           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
244
245     scm:
246       - lf-infra-gerrit-scm:
247           jenkins-ssh-credential: '{jenkins-ssh-credential}'
248           git-url: '{git-url}/{project}.git'
249           refspec: '$GERRIT_REFSPEC'
250           branch: '$GERRIT_BRANCH'
251           submodule-recursive: '{submodule-recursive}'
252           submodule-timeout: '{submodule-timeout}'
253           submodule-disable: false
254           choosing-strategy: default
255
256     triggers:
257       - gerrit:
258           server-name: '{gerrit-server-name}'
259           trigger-on: '{obj:gerrit_verify_triggers}'
260           projects:
261             - project-compare-type: ANT
262               project-pattern: '{project}'
263               branches:
264                 - branch-compare-type: ANT
265                   branch-pattern: '**/{branch}'
266               file-paths: '{obj:gerrit_trigger_file_paths}'
267
268     builders:
269       - lf-infra-pre-build
270       - config-file-provider:
271           files:
272             - file-id: kni-coreos-pull-secret
273               target: akraino-secrets/coreos-pull-secret
274       - shell: !include-raw-escape:
275           - ../shell/install_go.sh
276       - shell: !include-raw-escape:
277           - ../shell/kni_deploy_aws.sh
278
279     publishers:
280       - lf-infra-publish
281
282 - job-template:
283     id: kni-blueprint-pae-verify-deploy-libvirt
284     name: '{project-name}-verify-deploy-libvirt'
285
286     ######################
287     # Default parameters #
288     ######################
289
290     build-days-to-keep: 30
291     build-timeout: 60
292     build-node: kni-libvirt
293     submodule-recursive: true
294
295     #####################
296     # Job Configuration #
297     #####################
298
299     project-type: freestyle
300     node: '{build-node}'
301
302     properties:
303       - lf-infra-properties:
304           build-days-to-keep: '{build-days-to-keep}'
305
306     parameters:
307       - lf-infra-parameters:
308           project: '{project}'
309           branch: '{branch}'
310           stream: '{stream}'
311           lftools-version: '{lftools-version}'
312       - string:
313           name: ARCHIVE_ARTIFACTS
314           default: '{archive-artifacts}'
315           description: Artifacts to archive to the logs server.
316
317     archive-artifacts: >
318       **/*.log
319
320     wrappers:
321       - lf-infra-wrappers:
322           build-timeout: '{build-timeout}'
323           jenkins-ssh-credential: '{jenkins-ssh-credential}'
324       - credentials-binding:
325           - ssh-user-private-key:
326               credential-id: kni-secrets
327               key-file-variable: KNI_KEY_PATH
328
329     gerrit_trigger_file_paths:
330       - compare-type: REG_EXP
331         pattern: 'profiles/testing.libvirt/*'
332       - compare-type: REG_EXP
333         pattern: 'sites/testing.virt.edge-sites.net/*'
334
335     gerrit_verify_triggers:
336       - patchset-created-event:
337           exclude-drafts: true
338           exclude-trivial-rebase: false
339           exclude-no-code-change: false
340       - draft-published-event
341       - comment-added-contains-event:
342           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
343
344     triggers:
345       - gerrit:
346           server-name: '{gerrit-server-name}'
347           trigger-on: '{obj:gerrit_verify_triggers}'
348           projects:
349             - project-compare-type: ANT
350               project-pattern: '{project}'
351               branches:
352                 - branch-compare-type: ANT
353                   branch-pattern: '**/{branch}'
354               file-paths: '{obj:gerrit_trigger_file_paths}'
355
356     scm:
357       - lf-infra-gerrit-scm:
358           jenkins-ssh-credential: '{jenkins-ssh-credential}'
359           git-url: '{git-url}/{project}.git'
360           refspec: '$GERRIT_REFSPEC'
361           branch: '$GERRIT_BRANCH'
362           submodule-recursive: '{submodule-recursive}'
363           submodule-timeout: '{submodule-timeout}'
364           submodule-disable: false
365           choosing-strategy: default
366
367     builders:
368       - lf-infra-pre-build
369       - config-file-provider:
370           files:
371             - file-id: kni-coreos-pull-secret
372               target: akraino-secrets/coreos-pull-secret
373             - file-id: kni-ssh-pub-key
374               target: akraino-secrets/ssh-pub-key
375       - shell: !include-raw-escape:
376           - ../shell/install_go.sh
377       - shell: !include-raw-escape:
378           - ../shell/kni_deploy_libvirt.sh
379
380     publishers:
381       - lf-infra-publish
382
383 - job-template:
384     id: kni-installer-publish-openshift-install-libvirt-binary
385     name: '{project-name}-publish-openshift-install-libvirt-binary'
386
387     ######################
388     # Default parameters #
389     ######################
390
391     build-days-to-keep: 200
392     build-timeout: 60
393     build-node: centos7-builder-8c-8g
394     submodule-recursive: true
395
396     #####################
397     # Job Configuration #
398     #####################
399
400     project-type: freestyle
401     node: '{build-node}'
402
403     properties:
404       - lf-infra-properties:
405           build-days-to-keep: '{build-days-to-keep}'
406
407     parameters:
408       - lf-infra-parameters:
409           project: '{project}'
410           branch: '{branch}'
411           stream: '{stream}'
412           lftools-version: '{lftools-version}'
413
414     wrappers:
415       - lf-infra-wrappers:
416           build-timeout: '{build-timeout}'
417           jenkins-ssh-credential: '{jenkins-ssh-credential}'
418
419     gerrit_build_triggers:
420       - comment-added-contains-event:
421           comment-contains-value: '^build-binary'
422
423     scm:
424       - lf-infra-gerrit-scm:
425           jenkins-ssh-credential: '{jenkins-ssh-credential}'
426           git-url: '{git-url}/{project}.git'
427           refspec: '$GERRIT_REFSPEC'
428           branch: '$GERRIT_BRANCH'
429           submodule-recursive: '{submodule-recursive}'
430           submodule-timeout: '{submodule-timeout}'
431           submodule-disable: false
432           choosing-strategy: default
433
434     triggers:
435       - gerrit:
436           server-name: '{gerrit-server-name}'
437           trigger-on: '{obj:gerrit_build_triggers}'
438           projects:
439             - project-compare-type: ANT
440               project-pattern: '{project}'
441               branches:
442                 - branch-compare-type: ANT
443                   branch-pattern: '**/{branch}'
444
445     builders:
446       - lf-infra-pre-build
447       - shell: !include-raw-escape:
448           - ../shell/install_go.sh
449       - shell: !include-raw-escape:
450           - ../shell/build_openshift_install_libvirt_binary.sh
451
452     publishers:
453       - lf-infra-publish