Change compare type from REG_EXP to ANT
[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: ANT
137         pattern: 'Makefile'
138       - compare-type: ANT
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: ANT
232         pattern: 'profiles/production.aws/**'
233       - compare-type: ANT
234         pattern: 'sites/testing.aws.edge-sites.net/**'
235       - compare-type: ANT
236         pattern: 'base/**'
237
238     gerrit_verify_triggers:
239       - patchset-created-event:
240           exclude-drafts: true
241           exclude-trivial-rebase: false
242           exclude-no-code-change: false
243       - draft-published-event
244       - comment-added-contains-event:
245           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
246
247     scm:
248       - lf-infra-gerrit-scm:
249           jenkins-ssh-credential: '{jenkins-ssh-credential}'
250           git-url: '{git-url}/{project}.git'
251           refspec: '$GERRIT_REFSPEC'
252           branch: '$GERRIT_BRANCH'
253           submodule-recursive: '{submodule-recursive}'
254           submodule-timeout: '{submodule-timeout}'
255           submodule-disable: false
256           choosing-strategy: default
257
258     triggers:
259       - gerrit:
260           server-name: '{gerrit-server-name}'
261           trigger-on: '{obj:gerrit_verify_triggers}'
262           projects:
263             - project-compare-type: ANT
264               project-pattern: '{project}'
265               branches:
266                 - branch-compare-type: ANT
267                   branch-pattern: '**/{branch}'
268               file-paths: '{obj:gerrit_trigger_file_paths}'
269
270     builders:
271       - lf-infra-pre-build
272       - config-file-provider:
273           files:
274             - file-id: kni-coreos-pull-secret
275               target: akraino-secrets/coreos-pull-secret
276       - shell: !include-raw-escape:
277           - ../shell/install_go.sh
278       - shell: !include-raw-escape:
279           - ../shell/kni_deploy_aws.sh
280
281     publishers:
282       - lf-infra-publish
283
284 - job-template:
285     id: kni-blueprint-pae-verify-deploy-libvirt
286     name: '{project-name}-verify-deploy-libvirt'
287
288     ######################
289     # Default parameters #
290     ######################
291
292     build-days-to-keep: 30
293     build-timeout: 60
294     build-node: kni-libvirt
295     submodule-recursive: true
296
297     #####################
298     # Job Configuration #
299     #####################
300
301     project-type: freestyle
302     node: '{build-node}'
303
304     properties:
305       - lf-infra-properties:
306           build-days-to-keep: '{build-days-to-keep}'
307
308     parameters:
309       - lf-infra-parameters:
310           project: '{project}'
311           branch: '{branch}'
312           stream: '{stream}'
313           lftools-version: '{lftools-version}'
314       - string:
315           name: ARCHIVE_ARTIFACTS
316           default: '{archive-artifacts}'
317           description: Artifacts to archive to the logs server.
318
319     archive-artifacts: >
320       **/*.log
321
322     wrappers:
323       - lf-infra-wrappers:
324           build-timeout: '{build-timeout}'
325           jenkins-ssh-credential: '{jenkins-ssh-credential}'
326       - credentials-binding:
327           - ssh-user-private-key:
328               credential-id: kni-secrets
329               key-file-variable: KNI_KEY_PATH
330
331     gerrit_trigger_file_paths:
332       - compare-type: ANT
333         pattern: 'profiles/testing.libvirt/**'
334       - compare-type: ANT
335         pattern: 'sites/testing.virt.edge-sites.net/**'
336       - compare-type: ANT
337         pattern: 'base/**'
338
339     gerrit_verify_triggers:
340       - patchset-created-event:
341           exclude-drafts: true
342           exclude-trivial-rebase: false
343           exclude-no-code-change: false
344       - draft-published-event
345       - comment-added-contains-event:
346           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
347
348     triggers:
349       - gerrit:
350           server-name: '{gerrit-server-name}'
351           trigger-on: '{obj:gerrit_verify_triggers}'
352           projects:
353             - project-compare-type: ANT
354               project-pattern: '{project}'
355               branches:
356                 - branch-compare-type: ANT
357                   branch-pattern: '**/{branch}'
358               file-paths: '{obj:gerrit_trigger_file_paths}'
359
360     scm:
361       - lf-infra-gerrit-scm:
362           jenkins-ssh-credential: '{jenkins-ssh-credential}'
363           git-url: '{git-url}/{project}.git'
364           refspec: '$GERRIT_REFSPEC'
365           branch: '$GERRIT_BRANCH'
366           submodule-recursive: '{submodule-recursive}'
367           submodule-timeout: '{submodule-timeout}'
368           submodule-disable: false
369           choosing-strategy: default
370
371     builders:
372       - lf-infra-pre-build
373       - config-file-provider:
374           files:
375             - file-id: kni-coreos-pull-secret
376               target: akraino-secrets/coreos-pull-secret
377             - file-id: kni-ssh-pub-key
378               target: akraino-secrets/ssh-pub-key
379       - shell: !include-raw-escape:
380           - ../shell/install_go.sh
381       - shell: !include-raw-escape:
382           - ../shell/kni_deploy_libvirt.sh
383
384     publishers:
385       - lf-infra-publish
386
387 - job-template:
388     id: kni-installer-publish-openshift-install-libvirt-binary
389     name: '{project-name}-publish-openshift-install-libvirt-binary'
390
391     ######################
392     # Default parameters #
393     ######################
394
395     build-days-to-keep: 200
396     build-timeout: 60
397     build-node: centos7-builder-8c-8g
398     submodule-recursive: true
399
400     #####################
401     # Job Configuration #
402     #####################
403
404     project-type: freestyle
405     node: '{build-node}'
406
407     properties:
408       - lf-infra-properties:
409           build-days-to-keep: '{build-days-to-keep}'
410
411     parameters:
412       - lf-infra-parameters:
413           project: '{project}'
414           branch: '{branch}'
415           stream: '{stream}'
416           lftools-version: '{lftools-version}'
417
418     wrappers:
419       - lf-infra-wrappers:
420           build-timeout: '{build-timeout}'
421           jenkins-ssh-credential: '{jenkins-ssh-credential}'
422
423     gerrit_build_triggers:
424       - comment-added-contains-event:
425           comment-contains-value: '^build-binary'
426
427     scm:
428       - lf-infra-gerrit-scm:
429           jenkins-ssh-credential: '{jenkins-ssh-credential}'
430           git-url: '{git-url}/{project}.git'
431           refspec: '$GERRIT_REFSPEC'
432           branch: '$GERRIT_BRANCH'
433           submodule-recursive: '{submodule-recursive}'
434           submodule-timeout: '{submodule-timeout}'
435           submodule-disable: false
436           choosing-strategy: default
437
438     triggers:
439       - gerrit:
440           server-name: '{gerrit-server-name}'
441           trigger-on: '{obj:gerrit_build_triggers}'
442           projects:
443             - project-compare-type: ANT
444               project-pattern: '{project}'
445               branches:
446                 - branch-compare-type: ANT
447                   branch-pattern: '**/{branch}'
448
449     builders:
450       - lf-infra-pre-build
451       - shell: !include-raw-escape:
452           - ../shell/install_go.sh
453       - shell: !include-raw-escape:
454           - ../shell/build_openshift_install_libvirt_binary.sh
455
456     publishers:
457       - lf-infra-publish