dbe7850f49cdaba8d6d07f63220002c4f75778e7
[ci-management.git] / jjb / global-templates-script.yaml
1 ---
2 # vim: sw=2 ts=2 sts=2 et :
3
4
5 - job-template:
6     # Job template for verify a submission.  triggered on gerrit-trigger-patch-submitted, does
7     # scm, mvn with passed in goals, then run script
8     #
9     # Required Variables:
10     #   branch:         git branch
11     #   build-node:     what build node to run on
12     #   script:         build script to execute
13     #   mvn-settings:   settings file for this specific job
14     #   mvn-goals:      space separated list of maven build goals (e.g. clean, install
15     #                   etc, --version for noop)
16     name: '{project-name}-{stream}-verify-scm-mvn-script'
17
18     project-type: freestyle
19     concurrent: true
20     node: '{build-node}'
21
22     properties:
23       - ecomp-infra-properties:
24           build-days-to-keep: '{build-days-to-keep}'
25
26     parameters:
27       - ecomp-infra-parameters:
28           project: '{project}'
29           branch: '{branch}'
30           refspec: 'refs/heads/{branch}'
31           artifacts: '{archive-artifacts}'
32
33     scm:
34       - gerrit-trigger-scm:
35           refspec: '$GERRIT_REFSPEC'
36           choosing-strategy: 'gerrit'
37
38     wrappers:
39       - ecomp-infra-wrappers:
40           build-timeout: '{build-timeout}'
41
42     triggers:
43       - gerrit-trigger-patch-submitted:
44           server: '{server-name}'
45           project: '{project}'
46           branch: '{branch}'
47           files: '**'
48
49     builders:
50       - provide-maven-settings:
51           global-settings-file: 'global-settings'
52           settings-file: '{mvn-settings}'
53       - maven-target:
54           maven-version: 'mvn33'
55           goals: '{mvn-goals}'
56           settings: '{mvn-settings}'
57           settings-type: cfp
58           global-settings: 'global-settings'
59           global-settings-type: cfp
60       - docker-login
61       - shell: '{script}'
62
63
64
65 - job-template:
66     # Job template for merging a submission.  triggered on gerrit-trigger-patch-merged, does
67     # scm, mvn with passed-in goals, then run script
68     #
69     # Required Variables:
70     #   branch:         git branch
71     #   build-node:     what build node to run on
72     #   script:         build script to execute
73     #   mvn-settings:   settings file for this specific job
74     #   mvn-goals:      space separated list of maven build goals (--version for noop,
75     #                   clean deploy for deploy [version must be snapshot])
76     name: '{project-name}-{stream}-merge-scm-mvn-script'
77
78     project-type: freestyle
79     node: '{build-node}'
80
81     properties:
82       - ecomp-infra-properties:
83           build-days-to-keep: '{build-days-to-keep}'
84
85     parameters:
86       - ecomp-infra-parameters:
87           project: '{project}'
88           branch: '{branch}'
89           refspec: 'refs/heads/{branch}'
90           artifacts: '{archive-artifacts}'
91
92     scm:
93       - gerrit-trigger-scm:
94           refspec: ''
95           choosing-strategy: 'default'
96
97     wrappers:
98       - ecomp-infra-wrappers:
99           build-timeout: '{build-timeout}'
100
101     triggers:
102       - gerrit-trigger-patch-merged:
103           server: '{server-name}'
104           project: '{project}'
105           branch: '{branch}'
106           files: '**'
107
108     builders:
109       - provide-maven-settings:
110           global-settings-file: 'global-settings'
111           settings-file: '{mvn-settings}'
112       - maven-target:
113           maven-version: 'mvn33'
114           goals: '{mvn-goals}'
115           settings: '{mvn-settings}'
116           settings-type: cfp
117           global-settings: 'global-settings'
118           global-settings-type: cfp
119       - docker-login
120       - shell: '{script}'
121
122
123
124
125 - job-template:
126     # Job template for daily-release a submission.  triggered on timer, does scm,
127     # mvn with passed-in goals, then run script
128     #
129     # Required Variables:
130     #   branch:         git branch
131     #   build-node:     what build node to run on
132     #   script:         build script to execute
133     #   mvn-goals-versioning:    space separated list of maven build goals (--version for no op,
134     #                or    versions:set versions:update-child-modules versions:commit or --version)
135     #   mvn-goals: space separated list of maven build goals (--version for noop, or clean deploy)
136     name: '{project-name}-{stream}-daily-release-scm-mvn-script'
137
138     project-type: freestyle
139     concurrent: true
140     node: '{build-node}'
141
142     properties:
143       - ecomp-infra-properties:
144           build-days-to-keep: '{build-days-to-keep}'
145
146     parameters:
147       - ecomp-infra-parameters:
148           project: '{project}'
149           branch: '{branch}'
150           refspec: 'refs/heads/{branch}'
151           artifacts: '{archive-artifacts}'
152
153     scm:
154       - gerrit-trigger-scm:
155           refspec: ''
156           choosing-strategy: 'default'
157
158     wrappers:
159       - ecomp-infra-wrappers:
160           build-timeout: '{build-timeout}'
161
162     triggers:
163       # 11 AM UTC
164       - timed: 'H 11 * * *'
165
166     builders:
167       - provide-maven-settings:
168           global-settings-file: 'global-settings'
169           settings-file: '{mvn-settings}'
170       - inject:
171           properties-file: version.properties
172       - maven-target:
173           maven-version: 'mvn33'
174           goals: '{mvn-goals-versioning}'
175           properties:
176             - 'newVersion=${{release_version}}'
177           settings: '{mvn-settings}'
178           settings-type: cfp
179           global-settings: 'global-settings'
180           global-settings-type: cfp
181
182       - maven-target:
183           maven-version: 'mvn33'
184           goals: '{mvn-goals}'
185           properties:
186             - '{maven-deploy-properties}'
187           settings: '{mvn-settings}'
188           settings-type: cfp
189           global-settings: 'global-settings'
190           global-settings-type: cfp
191       - docker-login
192       - shell: '{script}'
193
194
195
196
197 - job-template:
198     # Job template for verifying a submission.  triggered on gerrit-trigger-patch-submitted,
199     # does scm 2 repos, mvn with passed-in goals, then run script
200     #
201     # Required Variables:
202     #   branch:         git branch
203     #   build-node:     what build node to run on
204     #   script:         build script to execute
205     #   extra-project:  extra gerrit project to checkout
206     #   extra-refspec:  refspec for the extra project
207     #   extra-branch:   branch to checkout for the extra project
208     #   checkout-dir:   directory to checkout the extra project to
209     #                     DO NOT SET THIS TO anything that translates to
210     #                     $WORKSPACE as it will destroy the initial
211     #                     project checkout
212     #   mvn-goals:      space separated list of maven build goals (e.g. clean, install etc,
213     #                   --version for noop)
214
215     name: '{project-name}-{stream}-verify-2scm-mvn-script'
216
217     project-type: freestyle
218     concurrent: true
219     node: '{build-node}'
220
221     properties:
222       - ecomp-infra-properties:
223           build-days-to-keep: '{build-days-to-keep}'
224
225     parameters:
226       - ecomp-infra-parameters:
227           project: '{project}'
228           branch: '{branch}'
229           refspec: 'refs/heads/{branch}'
230           artifacts: '{archive-artifacts}'
231
232     scm:
233       - gerrit-trigger-scm:
234           refspec: '$GERRIT_REFSPEC'
235           choosing-strategy: 'gerrit'
236       - git-extra-project:
237           project: '{extra-project}'
238           refspec: '{extra-refspec}'
239           branch: '{extra-branch}'
240           checkout-dir: '{checkout-dir}'
241
242     wrappers:
243       - ecomp-infra-wrappers:
244           build-timeout: '{build-timeout}'
245
246     triggers:
247       - gerrit-trigger-patch-submitted:
248           server: '{server-name}'
249           project: '{project}'
250           branch: '{branch}'
251           files: '**'
252
253     builders:
254       - provide-maven-settings:
255           global-settings-file: 'global-settings'
256           settings-file: '{mvn-settings}'
257       - maven-target:
258           maven-version: 'mvn33'
259           goals: '{mvn-goals}'
260           settings: '{mvn-settings}'
261           settings-type: cfp
262           global-settings: 'global-settings'
263           global-settings-type: cfp
264       - docker-login
265       - shell: '{script}'
266
267
268
269 - job-template:
270     # Job template for merged submission.  triggered on gerrit-trigger-patch-merged,
271     # does scm of 2 repos, mvn with passed in goals, then run script
272     #
273     # Required Variables:
274     #   branch:         git branch
275     #   build-node:     what build node to run on
276     #   script:         build script to execute
277     #   extra-project:  extra gerrit project to checkout
278     #   extra-refspec:  refspec for the extra project
279     #   extra-branch:   branch to checkout for the extra project
280     #   checkout-dir:   directory to checkout the extra project to
281     #                     DO NOT SET THIS TO anything that translates to
282     #                     $WORKSPACE as it will destroy the initial
283     #                     project checkout
284     #   mvn-goals:      space separated list of maven build goals (--version for no op,
285     #                   clean deploy for mvn project)
286
287     name: '{project-name}-{stream}-merge-2scm-mvn-script'
288
289     project-type: freestyle
290     concurrent: true
291     node: '{build-node}'
292
293     properties:
294       - ecomp-infra-properties:
295           build-days-to-keep: '{build-days-to-keep}'
296
297     parameters:
298       - ecomp-infra-parameters:
299           project: '{project}'
300           branch: '{branch}'
301           refspec: 'refs/heads/{branch}'
302           artifacts: '{archive-artifacts}'
303
304     scm:
305       - gerrit-trigger-scm:
306           refspec: ''
307           choosing-strategy: 'default'
308       - git-extra-project:
309           project: '{extra-project}'
310           refspec: '{extra-refspec}'
311           branch: '{extra-branch}'
312           checkout-dir: '{checkout-dir}'
313
314     wrappers:
315       - ecomp-infra-wrappers:
316           build-timeout: '{build-timeout}'
317
318     triggers:
319       - gerrit-trigger-patch-merged:
320           server: '{server-name}'
321           project: '{project}'
322           branch: '{branch}'
323           files: '**'
324
325     builders:
326       - provide-maven-settings:
327           global-settings-file: 'global-settings'
328           settings-file: '{mvn-settings}'
329       - maven-target:
330           maven-version: 'mvn33'
331           goals: '{mvn-goals}'
332           settings: '{mvn-settings}'
333           settings-type: cfp
334           global-settings: 'global-settings'
335           global-settings-type: cfp
336       - docker-login
337       - shell: '{script}'
338
339
340
341 - job-template:
342     # Job template for merged submission.  triggered on gerrit-trigger-patch-merged,
343     # does scm x2, mvn with passed-in goals, then run script
344     #
345     # Required Variables:
346     #   branch:         git branch
347     #   build-node:     what build node to run on
348     #   script:         build script to execute
349     #   extra-project:  extra gerrit project to checkout
350     #   extra-refspec:  refspec for the extra project
351     #   extra-branch:   branch to checkout for the extra project
352     #   checkout-dir:   directory to checkout the extra project to
353     #                     DO NOT SET THIS TO anything that translates to
354     #                     $WORKSPACE as it will destroy the initial
355     #                     project checkout
356     #   mvn-goals:      space separated list of maven build goals (--version for no op,
357     #                   clean deploy for mvn project)
358     #   mvn-goals-versioning:      space separated list of maven build goals (--version for no op,
359     #                   clean deploy for mvn project)
360
361     name: '{project-name}-{stream}-daily-release-2scm-mvn-script'
362
363     project-type: freestyle
364     concurrent: true
365     node: '{build-node}'
366
367     properties:
368       - ecomp-infra-properties:
369           build-days-to-keep: '{build-days-to-keep}'
370
371     parameters:
372       - ecomp-infra-parameters:
373           project: '{project}'
374           branch: '{branch}'
375           refspec: 'refs/heads/{branch}'
376           artifacts: '{archive-artifacts}'
377
378     scm:
379       - gerrit-trigger-scm:
380           refspec: ''
381           choosing-strategy: 'default'
382       - git-extra-project:
383           project: '{extra-project}'
384           refspec: '{extra-refspec}'
385           branch: '{extra-branch}'
386           checkout-dir: '{checkout-dir}'
387
388     wrappers:
389       - ecomp-infra-wrappers:
390           build-timeout: '{build-timeout}'
391
392     triggers:
393       - timed: 'H 11 * * *'
394
395     builders:
396       - provide-maven-settings:
397           global-settings-file: 'global-settings'
398           settings-file: '{mvn-settings}'
399       - inject:
400           properties-file: version.properties
401       - maven-target:
402           maven-version: 'mvn33'
403           goals: '{mvn-goals-versioning}'
404           properties:
405             - 'newVersion=${{release_version}}'
406           settings: '{mvn-settings}'
407           settings-type: cfp
408           global-settings: 'global-settings'
409           global-settings-type: cfp
410
411       - maven-target:
412           maven-version: 'mvn33'
413           goals: '{mvn-goals}'
414           settings: '{mvn-settings}'
415           settings-type: cfp
416           global-settings: 'global-settings'
417           global-settings-type: cfp
418       - docker-login
419       - shell: '{script}'
420
421
422
423
424
425 - job-template:
426     # Job template for basic scm and script trigger
427     #
428     # Required Variables:
429     #   branch:         git branch
430     #   build-node:     what build node to run on
431     #   script:         build script to execute
432
433     name: '{project-name}-{stream}-verify-script'
434
435     project-type: freestyle
436     concurrent: true
437     node: '{build-node}'
438
439     properties:
440       - ecomp-infra-properties:
441           build-days-to-keep: '{build-days-to-keep}'
442
443     parameters:
444       - ecomp-infra-parameters:
445           project: '{project}'
446           branch: '{branch}'
447           refspec: 'refs/heads/{branch}'
448           artifacts: '{archive-artifacts}'
449
450     scm:
451       - gerrit-trigger-scm:
452           refspec: '$GERRIT_REFSPEC'
453           choosing-strategy: 'gerrit'
454
455     wrappers:
456       - ecomp-infra-wrappers:
457           build-timeout: '{build-timeout}'
458
459     triggers:
460       - gerrit-trigger-patch-submitted:
461           server: '{server-name}'
462           project: '{project}'
463           branch: '{branch}'
464           files: '**'
465
466     builders:
467       - provide-maven-settings:
468           global-settings-file: 'global-settings'
469           settings-file: '{mvn-settings}'
470       # make sure maven gets installed / setup
471       - maven-target:
472           maven-version: 'mvn33'
473           goals: '--version'
474           settings: '{mvn-settings}'
475           settings-type: cfp
476           global-settings: 'global-settings'
477           global-settings-type: cfp
478       - shell: '{script}'
479
480 #    publishers:
481 #      - ecomp-infra-shiplogs:
482 #          maven-version: 'mvn33'
483
484 - job-template:
485     # Job template for 2 scm and script trigger
486     #
487     # Required Variables:
488     #   branch:         git branch
489     #   build-node:     what build node to run on
490     #   script:         build script to execute
491     #   extra-project:  extra gerrit project to checkout
492     #   extra-refspec:  refspec for the extra project
493     #   extra-branch:   branch to checkout for the extra project
494     #   checkout-dir:   directory to checkout the extra project to
495     #                     DO NOT SET THIS TO anything that translates to
496     #                     $WORKSPACE as it will destroy the initial
497     #                     project checkout
498
499     name: '{project-name}-{stream}-two-scm-verify-script'
500
501     project-type: freestyle
502     concurrent: true
503     node: '{build-node}'
504
505     properties:
506       - ecomp-infra-properties:
507           build-days-to-keep: '{build-days-to-keep}'
508
509     parameters:
510       - ecomp-infra-parameters:
511           project: '{project}'
512           branch: '{branch}'
513           refspec: 'refs/heads/{branch}'
514           artifacts: '{archive-artifacts}'
515
516     scm:
517       - gerrit-trigger-scm:
518           refspec: '$GERRIT_REFSPEC'
519           choosing-strategy: 'gerrit'
520       - git-extra-project:
521           project: '{extra-project}'
522           refspec: '{extra-refspec}'
523           branch: '{extra-branch}'
524           checkout-dir: '{checkout-dir}'
525
526     wrappers:
527       - ecomp-infra-wrappers:
528           build-timeout: '{build-timeout}'
529
530     triggers:
531       - gerrit-trigger-patch-submitted:
532           server: '{server-name}'
533           project: '{project}'
534           branch: '{branch}'
535           files: '**'
536
537     builders:
538       - provide-maven-settings:
539           global-settings-file: 'global-settings'
540           settings-file: '{mvn-settings}'
541       # make sure maven gets installed / setup
542       - maven-target:
543           maven-version: 'mvn33'
544           goals: '--version'
545           settings: '{mvn-settings}'
546           settings-type: cfp
547           global-settings: 'global-settings'
548           global-settings-type: cfp
549       - shell: '{script}'
550
551 #    publishers:
552 #      - ecomp-infra-shiplogs:
553 #          maven-version: 'mvn33'
554
555
556 - job-template:
557     # Job template for 3 scm and script trigger
558     #
559     # Required Variables:
560     #   branch:         git branch
561     #   build-node:     what build node to run on
562     #   script:         build script to execute
563     #   extra-project1:  extra gerrit project to checkout
564     #   extra-refspec1:  refspec for the extra project
565     #   extra-branch1:   branch to checkout for the extra project
566     #   checkout-dir1:   directory to checkout the extra project to
567     #                     DO NOT SET THIS TO anything that translates to
568     #                     $WORKSPACE as it will destroy the initial
569     #                     project checkout
570     #   extra-project2:  extra gerrit project to checkout
571     #   extra-refspec2:  refspec for the extra project
572     #   extra-branch2:   branch to checkout for the extra project
573     #   checkout-dir2:   directory to checkout the extra project to
574     #                     DO NOT SET THIS TO anything that translates to
575     #                     $WORKSPACE as it will destroy the initial
576     #                     project checkout
577     name: '{project-name}-{stream}-three-scm-verify-script'
578
579     project-type: freestyle
580     concurrent: true
581     node: '{build-node}'
582
583     properties:
584       - ecomp-infra-properties:
585           build-days-to-keep: '{build-days-to-keep}'
586
587     parameters:
588       - ecomp-infra-parameters:
589           project: '{project}'
590           branch: '{branch}'
591           refspec: 'refs/heads/{branch}'
592           artifacts: '{archive-artifacts}'
593
594     scm:
595       - gerrit-trigger-scm:
596           refspec: '$GERRIT_REFSPEC'
597           choosing-strategy: 'gerrit'
598       - git-extra-project:
599           project: '{extra-project1}'
600           refspec: '{extra-refspec1}'
601           branch: '{extra-branch1}'
602           checkout-dir: '{checkout-dir1}'
603       - git-extra-project:
604           project: '{extra-project2}'
605           refspec: '{extra-refspec2}'
606           branch: '{extra-branch2}'
607           checkout-dir: '{checkout-dir2}'
608
609     wrappers:
610       - ecomp-infra-wrappers:
611           build-timeout: '{build-timeout}'
612
613     triggers:
614       - gerrit-trigger-patch-submitted:
615           server: '{server-name}'
616           project: '{project}'
617           branch: '{branch}'
618           files: '**'
619
620     builders:
621       - provide-maven-settings:
622           global-settings-file: 'global-settings'
623           settings-file: '{mvn-settings}'
624       # make sure maven gets installed / setup
625       - maven-target:
626           maven-version: 'mvn33'
627           goals: '--version'
628           settings: '{mvn-settings}'
629           settings-type: cfp
630           global-settings: 'global-settings'
631           global-settings-type: cfp
632       - shell: '{script}'
633
634 #    publishers:
635 #      - ecomp-infra-shiplogs:
636 #          maven-version: 'mvn33'