Merge "portal docker release job added"
[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 verifying a submission.  triggered on
7     # gerrit-trigger-patch-submitted, does scm, mvn with passed in goals,
8     # then run script
9     #
10     # Required Variables:
11     #   branch:         git branch
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.
15     #                   clean, install etc, --version for noop)
16     name: '{project-name}-{stream}-verify-scm-mvn-script'
17
18     project-type: freestyle
19     concurrent: true
20     node: 'ubuntu1604-docker-8c-8g'
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       - maven-exec:
33           maven-version: 'mvn33'
34
35     scm:
36       - gerrit-trigger-scm:
37           refspec: '$GERRIT_REFSPEC'
38           choosing-strategy: 'gerrit'
39
40     wrappers:
41       - ecomp-infra-wrappers:
42           build-timeout: '{build-timeout}'
43
44     triggers:
45       - gerrit-trigger-patch-submitted:
46           server: '{server-name}'
47           project: '{project}'
48           branch: '{branch}'
49           files: '**'
50
51     builders:
52       - provide-maven-settings:
53           global-settings-file: 'global-settings'
54           settings-file: '{mvn-settings}'
55       - maven-target:
56           maven-version: 'mvn33'
57           goals: '{mvn-goals}'
58           settings: '{mvn-settings}'
59           settings-type: cfp
60           global-settings: 'global-settings'
61           global-settings-type: cfp
62       - docker-login
63       - shell: '{script}'
64
65
66 - job-template:
67     # Job template for merging a submission.  triggered on
68     # gerrit-trigger-patch-merged, does scm, mvn with passed-in goals, then
69     # run script
70     # Required Variables:
71     #   branch:         git branch
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
75     #                   for noop, clean deploy for deploy [snapshot])
76     name: '{project-name}-{stream}-merge-scm-mvn-script'
77
78     project-type: freestyle
79     node: 'ubuntu1604-docker-8c-8g'
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       - maven-exec:
92           maven-version: 'mvn33'
93
94     scm:
95       - gerrit-trigger-scm:
96           refspec: ''
97           choosing-strategy: 'default'
98
99     wrappers:
100       - ecomp-infra-wrappers:
101           build-timeout: '{build-timeout}'
102
103     triggers:
104       - gerrit-trigger-patch-merged:
105           server: '{server-name}'
106           project: '{project}'
107           branch: '{branch}'
108           files: '**'
109
110     builders:
111       - provide-maven-settings:
112           global-settings-file: 'global-settings'
113           settings-file: '{mvn-settings}'
114       - maven-target:
115           maven-version: 'mvn33'
116           goals: '{mvn-goals}'
117           settings: '{mvn-settings}'
118           settings-type: cfp
119           global-settings: 'global-settings'
120           global-settings-type: cfp
121       - docker-login
122       - shell: '{script}'
123
124
125 - job-template:
126     # Job template for daily-release a submission.  triggered on timer, does
127     # scm mvn with passed-in goals, then run script
128     #
129     # Required Variables:
130     #   branch:         git branch
131     #   script:         build script to execute
132     #   mvn-goals-versioning: space separated list of maven build goals
133     #      (--version for no op,
134     #      or versions:set versions:update-child-modules versions:commit)
135     #   mvn-goals: space separated list of maven build goals (--version for
136     #      noop, or clean deploy)
137     name: '{project-name}-{stream}-daily-release-scm-mvn-script'
138
139     project-type: freestyle
140     concurrent: true
141     node: 'ubuntu1604-docker-8c-8g'
142
143     properties:
144       - ecomp-infra-properties:
145           build-days-to-keep: '{build-days-to-keep}'
146
147     parameters:
148       - ecomp-infra-parameters:
149           project: '{project}'
150           branch: '{branch}'
151           refspec: 'refs/heads/{branch}'
152           artifacts: '{archive-artifacts}'
153       - maven-exec:
154           maven-version: 'mvn33'
155
156     scm:
157       - gerrit-trigger-scm:
158           refspec: ''
159           choosing-strategy: 'default'
160
161     wrappers:
162       - ecomp-infra-wrappers:
163           build-timeout: '{build-timeout}'
164
165     triggers:
166       # 11 AM UTC
167       - timed: 'H 11 * * *'
168
169     builders:
170       - provide-maven-settings:
171           global-settings-file: 'global-settings'
172           settings-file: '{mvn-settings}'
173       - inject:
174           properties-file: version.properties
175       - maven-target:
176           maven-version: 'mvn33'
177           goals: '{mvn-goals-versioning}'
178           properties:
179             - 'newVersion=${{release_version}}'
180           settings: '{mvn-settings}'
181           settings-type: cfp
182           global-settings: 'global-settings'
183           global-settings-type: cfp
184
185       - maven-target:
186           maven-version: 'mvn33'
187           goals: '{mvn-goals}'
188           properties:
189             - '{maven-deploy-properties}'
190           settings: '{mvn-settings}'
191           settings-type: cfp
192           global-settings: 'global-settings'
193           global-settings-type: cfp
194       - docker-login
195       - shell: '{script}'
196
197
198 - job-template:
199     # Job template for verifying a submission.  triggered on
200     # gerrit-trigger-patch-submitted,
201     # does scm 2 repos, mvn with passed-in goals, then run script
202     #
203     # Required Variables:
204     #   branch:         git branch
205     #   script:         build script to execute
206     #   extra-project:  extra gerrit project to checkout
207     #   extra-refspec:  refspec for the extra project
208     #   extra-branch:   branch to checkout for the extra project
209     #   checkout-dir:   directory to checkout the extra project to
210     #                     DO NOT SET THIS TO anything that translates to
211     #                     $WORKSPACE as it will destroy the initial
212     #                     project checkout
213     #   mvn-goals:      space separated list of maven build goals (e.g.
214     #                   clean, install etc,  --version for noop)
215
216     name: '{project-name}-{stream}-verify-2scm-mvn-script'
217
218     project-type: freestyle
219     concurrent: true
220     node: 'ubuntu1604-docker-8c-8g'
221
222     properties:
223       - ecomp-infra-properties:
224           build-days-to-keep: '{build-days-to-keep}'
225
226     parameters:
227       - ecomp-infra-parameters:
228           project: '{project}'
229           branch: '{branch}'
230           refspec: 'refs/heads/{branch}'
231           artifacts: '{archive-artifacts}'
232       - maven-exec:
233           maven-version: 'mvn33'
234
235     scm:
236       - gerrit-trigger-scm:
237           refspec: '$GERRIT_REFSPEC'
238           choosing-strategy: 'gerrit'
239       - git-extra-project:
240           project: '{extra-project}'
241           refspec: '{extra-refspec}'
242           branch: '{extra-branch}'
243           checkout-dir: '{checkout-dir}'
244
245     wrappers:
246       - ecomp-infra-wrappers:
247           build-timeout: '{build-timeout}'
248
249     triggers:
250       - gerrit-trigger-patch-submitted:
251           server: '{server-name}'
252           project: '{project}'
253           branch: '{branch}'
254           files: '**'
255
256     builders:
257       - provide-maven-settings:
258           global-settings-file: 'global-settings'
259           settings-file: '{mvn-settings}'
260       - maven-target:
261           maven-version: 'mvn33'
262           goals: '{mvn-goals}'
263           settings: '{mvn-settings}'
264           settings-type: cfp
265           global-settings: 'global-settings'
266           global-settings-type: cfp
267       - docker-login
268       - shell: '{script}'
269
270
271 - job-template:
272     # Job template for merged submission.  triggered on
273     # gerrit-trigger-patch-merged,does scm of 2 repos, mvn with passed in
274     # goals, then run script
275     #
276     # Required Variables:
277     #   branch:         git branch
278     #   script:         build script to execute
279     #   extra-project:  extra gerrit project to checkout
280     #   extra-refspec:  refspec for the extra project
281     #   extra-branch:   branch to checkout for the extra project
282     #   checkout-dir:   directory to checkout the extra project to
283     #                     DO NOT SET THIS TO anything that translates to
284     #                     $WORKSPACE as it will destroy the initial
285     #                     project checkout
286     #   mvn-goals:      space separated list of maven build goals (--version
287     #                   for noop, clean deploy for mvn project)
288
289     name: '{project-name}-{stream}-merge-2scm-mvn-script'
290
291     project-type: freestyle
292     concurrent: true
293     node: 'ubuntu1604-docker-8c-8g'
294
295     properties:
296       - ecomp-infra-properties:
297           build-days-to-keep: '{build-days-to-keep}'
298
299     parameters:
300       - ecomp-infra-parameters:
301           project: '{project}'
302           branch: '{branch}'
303           refspec: 'refs/heads/{branch}'
304           artifacts: '{archive-artifacts}'
305       - maven-exec:
306           maven-version: 'mvn33'
307
308     scm:
309       - gerrit-trigger-scm:
310           refspec: ''
311           choosing-strategy: 'default'
312       - git-extra-project:
313           project: '{extra-project}'
314           refspec: '{extra-refspec}'
315           branch: '{extra-branch}'
316           checkout-dir: '{checkout-dir}'
317
318     wrappers:
319       - ecomp-infra-wrappers:
320           build-timeout: '{build-timeout}'
321
322     triggers:
323       - gerrit-trigger-patch-merged:
324           server: '{server-name}'
325           project: '{project}'
326           branch: '{branch}'
327           files: '**'
328
329     builders:
330       - provide-maven-settings:
331           global-settings-file: 'global-settings'
332           settings-file: '{mvn-settings}'
333       - maven-target:
334           maven-version: 'mvn33'
335           goals: '{mvn-goals}'
336           settings: '{mvn-settings}'
337           settings-type: cfp
338           global-settings: 'global-settings'
339           global-settings-type: cfp
340       - docker-login
341       - shell: '{script}'
342
343
344 - job-template:
345     # Job template for merged submission.  triggered on
346     # gerrit-trigger-patch-merged, does scm x2, mvn with passed-in goals,
347     # then run script
348     #
349     # Required Variables:
350     #   branch:         git branch
351     #   script:         build script to execute
352     #   extra-project:  extra gerrit project to checkout
353     #   extra-refspec:  refspec for the extra project
354     #   extra-branch:   branch to checkout for the extra project
355     #   checkout-dir:   directory to checkout the extra project to
356     #                     DO NOT SET THIS TO anything that translates to
357     #                     $WORKSPACE as it will destroy the initial
358     #                     project checkout
359     #   mvn-goals:      space separated list of maven build goals (--version
360     #                   for noop, clean deploy for mvn project)
361     #   mvn-goals-versioning:      space separated list of maven build goals
362     #                   (--version for no op, clean deploy for mvn project)
363
364     name: '{project-name}-{stream}-daily-release-2scm-mvn-script'
365
366     project-type: freestyle
367     node: 'ubuntu1604-docker-8c-8g'
368
369     properties:
370       - ecomp-infra-properties:
371           build-days-to-keep: '{build-days-to-keep}'
372
373     parameters:
374       - ecomp-infra-parameters:
375           project: '{project}'
376           branch: '{branch}'
377           refspec: 'refs/heads/{branch}'
378           artifacts: '{archive-artifacts}'
379       - maven-exec:
380           maven-version: 'mvn33'
381
382     scm:
383       - gerrit-trigger-scm:
384           refspec: ''
385           choosing-strategy: 'default'
386       - git-extra-project:
387           project: '{extra-project}'
388           refspec: '{extra-refspec}'
389           branch: '{extra-branch}'
390           checkout-dir: '{checkout-dir}'
391
392     wrappers:
393       - ecomp-infra-wrappers:
394           build-timeout: '{build-timeout}'
395
396     triggers:
397       - timed: 'H 11 * * *'
398
399     builders:
400       - provide-maven-settings:
401           global-settings-file: 'global-settings'
402           settings-file: '{mvn-settings}'
403       - inject:
404           properties-file: version.properties
405       - maven-target:
406           maven-version: 'mvn33'
407           goals: '{mvn-goals-versioning}'
408           properties:
409             - 'newVersion=${{release_version}}'
410           settings: '{mvn-settings}'
411           settings-type: cfp
412           global-settings: 'global-settings'
413           global-settings-type: cfp
414
415       - maven-target:
416           maven-version: 'mvn33'
417           goals: '{mvn-goals}'
418           settings: '{mvn-settings}'
419           settings-type: cfp
420           global-settings: 'global-settings'
421           global-settings-type: cfp
422       - docker-login
423       - shell: '{script}'
424
425
426 - job-template:
427     # Job template for basic scm and script trigger
428     #
429     # Required Variables:
430     #   branch:         git branch
431     #   build-node:     what build node to run on
432     #   script:         build script to execute
433
434     name: '{project-name}-{stream}-verify-script'
435
436     project-type: freestyle
437     concurrent: true
438     node: '{build-node}'
439
440     properties:
441       - ecomp-infra-properties:
442           build-days-to-keep: '{build-days-to-keep}'
443
444     parameters:
445       - ecomp-infra-parameters:
446           project: '{project}'
447           branch: '{branch}'
448           refspec: 'refs/heads/{branch}'
449           artifacts: '{archive-artifacts}'
450       - maven-exec:
451           maven-version: 'mvn33'
452
453     scm:
454       - gerrit-trigger-scm:
455           refspec: '$GERRIT_REFSPEC'
456           choosing-strategy: 'gerrit'
457
458     wrappers:
459       - ecomp-infra-wrappers:
460           build-timeout: '{build-timeout}'
461
462     triggers:
463       - gerrit-trigger-patch-submitted:
464           server: '{server-name}'
465           project: '{project}'
466           branch: '{branch}'
467           files: '**'
468
469     builders:
470       - provide-maven-settings:
471           global-settings-file: 'global-settings'
472           settings-file: '{mvn-settings}'
473       # make sure maven gets installed / setup
474       - maven-target:
475           maven-version: 'mvn33'
476           goals: '--version'
477           settings: '{mvn-settings}'
478           settings-type: cfp
479           global-settings: 'global-settings'
480           global-settings-type: cfp
481       - shell: '{script}'
482
483 #    publishers:
484 #      - ecomp-infra-shiplogs:
485 #          maven-version: 'mvn33'
486
487 - job-template:
488     # Job template for 2 scm and script trigger
489     #
490     # Required Variables:
491     #   branch:         git branch
492     #   build-node:     what build node to run on
493     #   script:         build script to execute
494     #   extra-project:  extra gerrit project to checkout
495     #   extra-refspec:  refspec for the extra project
496     #   extra-branch:   branch to checkout for the extra project
497     #   checkout-dir:   directory to checkout the extra project to
498     #                     DO NOT SET THIS TO anything that translates to
499     #                     $WORKSPACE as it will destroy the initial
500     #                     project checkout
501
502     name: '{project-name}-{stream}-two-scm-verify-script'
503
504     project-type: freestyle
505     concurrent: true
506     node: '{build-node}'
507
508     properties:
509       - ecomp-infra-properties:
510           build-days-to-keep: '{build-days-to-keep}'
511
512     parameters:
513       - ecomp-infra-parameters:
514           project: '{project}'
515           branch: '{branch}'
516           refspec: 'refs/heads/{branch}'
517           artifacts: '{archive-artifacts}'
518       - maven-exec:
519           maven-version: 'mvn33'
520
521     scm:
522       - gerrit-trigger-scm:
523           refspec: '$GERRIT_REFSPEC'
524           choosing-strategy: 'gerrit'
525       - git-extra-project:
526           project: '{extra-project}'
527           refspec: '{extra-refspec}'
528           branch: '{extra-branch}'
529           checkout-dir: '{checkout-dir}'
530
531     wrappers:
532       - ecomp-infra-wrappers:
533           build-timeout: '{build-timeout}'
534
535     triggers:
536       - gerrit-trigger-patch-submitted:
537           server: '{server-name}'
538           project: '{project}'
539           branch: '{branch}'
540           files: '**'
541
542     builders:
543       - provide-maven-settings:
544           global-settings-file: 'global-settings'
545           settings-file: '{mvn-settings}'
546       # make sure maven gets installed / setup
547       - maven-target:
548           maven-version: 'mvn33'
549           goals: '--version'
550           settings: '{mvn-settings}'
551           settings-type: cfp
552           global-settings: 'global-settings'
553           global-settings-type: cfp
554       - shell: '{script}'
555
556 #    publishers:
557 #      - ecomp-infra-shiplogs:
558 #          maven-version: 'mvn33'
559
560
561 - job-template:
562     # Job template for 3 scm and script trigger
563     #
564     # Required Variables:
565     #   branch:         git branch
566     #   build-node:     what build node to run on
567     #   script:         build script to execute
568     #   extra-project1:  extra gerrit project to checkout
569     #   extra-refspec1:  refspec for the extra project
570     #   extra-branch1:   branch to checkout for the extra project
571     #   checkout-dir1:   directory to checkout the extra project to
572     #                     DO NOT SET THIS TO anything that translates to
573     #                     $WORKSPACE as it will destroy the initial
574     #                     project checkout
575     #   extra-project2:  extra gerrit project to checkout
576     #   extra-refspec2:  refspec for the extra project
577     #   extra-branch2:   branch to checkout for the extra project
578     #   checkout-dir2:   directory to checkout the extra project to
579     #                     DO NOT SET THIS TO anything that translates to
580     #                     $WORKSPACE as it will destroy the initial
581     #                     project checkout
582     name: '{project-name}-{stream}-three-scm-verify-script'
583
584     project-type: freestyle
585     concurrent: true
586     node: '{build-node}'
587
588     properties:
589       - ecomp-infra-properties:
590           build-days-to-keep: '{build-days-to-keep}'
591
592     parameters:
593       - ecomp-infra-parameters:
594           project: '{project}'
595           branch: '{branch}'
596           refspec: 'refs/heads/{branch}'
597           artifacts: '{archive-artifacts}'
598       - maven-exec:
599           maven-version: 'mvn33'
600     scm:
601       - gerrit-trigger-scm:
602           refspec: '$GERRIT_REFSPEC'
603           choosing-strategy: 'gerrit'
604       - git-extra-project:
605           project: '{extra-project1}'
606           refspec: '{extra-refspec1}'
607           branch: '{extra-branch1}'
608           checkout-dir: '{checkout-dir1}'
609       - git-extra-project:
610           project: '{extra-project2}'
611           refspec: '{extra-refspec2}'
612           branch: '{extra-branch2}'
613           checkout-dir: '{checkout-dir2}'
614
615     wrappers:
616       - ecomp-infra-wrappers:
617           build-timeout: '{build-timeout}'
618
619     triggers:
620       - gerrit-trigger-patch-submitted:
621           server: '{server-name}'
622           project: '{project}'
623           branch: '{branch}'
624           files: '**'
625
626     builders:
627       - provide-maven-settings:
628           global-settings-file: 'global-settings'
629           settings-file: '{mvn-settings}'
630       # make sure maven gets installed / setup
631       - maven-target:
632           maven-version: 'mvn33'
633           goals: '--version'
634           settings: '{mvn-settings}'
635           settings-type: cfp
636           global-settings: 'global-settings'
637           global-settings-type: cfp
638       - shell: '{script}'
639
640 #    publishers:
641 #      - ecomp-infra-shiplogs:
642 #          maven-version: 'mvn33'
643
644 # vim: sw=2 ts=2 sts=2 et :
645
646 - job-template:
647     # Job template for scm and script trigger - for docker merge
648     #
649     # Required Variables:
650     #   branch:         git branch
651     #   build-node:     what build node to run on
652     #   script:         build script to execute
653
654     name: '{project-name}-{stream}-merge-docker-script'
655
656     project-type: freestyle
657     concurrent: true
658     node: '{build-node}'
659
660     properties:
661       - ecomp-infra-properties:
662           build-days-to-keep: '{build-days-to-keep}'
663
664     parameters:
665       - ecomp-infra-parameters:
666           project: '{project}'
667           branch: '{branch}'
668           refspec: 'refs/heads/{branch}'
669           artifacts: '{archive-artifacts}'
670       - maven-exec:
671           maven-version: 'mvn33'
672
673     scm:
674       - gerrit-trigger-scm:
675           refspec: ''
676           choosing-strategy: 'default'
677       - git-extra-project:
678           project: '{extra-project1}'
679           refspec: '{extra-refspec1}'
680           branch: '{extra-branch1}'
681           checkout-dir: '{checkout-dir1}'
682       - git-extra-project:
683           project: '{extra-project2}'
684           refspec: '{extra-refspec2}'
685           branch: '{extra-branch2}'
686           checkout-dir: '{checkout-dir2}'
687
688     wrappers:
689       - ecomp-infra-wrappers:
690           build-timeout: '{build-timeout}'
691
692     triggers:
693       - gerrit-trigger-patch-merged:
694           server: '{server-name}'
695           project: '{project}'
696           branch: '{branch}'
697           files: '**'
698
699     builders:
700       - provide-maven-settings:
701           global-settings-file: 'global-settings'
702           settings-file: '{mvn-settings}'
703       - docker-login
704       # make sure maven gets installed / setup
705       - maven-target:
706           maven-version: 'mvn33'
707           goals: '--version'
708           settings: '{mvn-settings}'
709           settings-type: cfp
710           global-settings: 'global-settings'
711           global-settings-type: cfp
712       - shell: '{script}'
713
714 #    publishers:
715 #      - ecomp-infra-shiplogs:
716 #          maven-version: 'mvn33'
717
718 - job-template:
719     # Job template for scm and script trigger - for docker daily release
720     #
721     # Required Variables:
722     #   branch:         git branch
723     #   build-node:     what build node to run on
724     #   script:         build script to execute
725
726     name: '{project-name}-{stream}-release-docker-script-daily'
727
728     project-type: freestyle
729     concurrent: true
730     node: '{build-node}'
731
732     properties:
733       - ecomp-infra-properties:
734           build-days-to-keep: '{build-days-to-keep}'
735
736     parameters:
737       - ecomp-infra-parameters:
738           project: '{project}'
739           branch: '{branch}'
740           refspec: 'refs/heads/{branch}'
741           artifacts: '{archive-artifacts}'
742       - maven-exec:
743           maven-version: 'mvn33'
744
745     scm:
746       - gerrit-trigger-scm:
747           refspec: ''
748           choosing-strategy: 'default'
749       - git-extra-project:
750           project: '{extra-project1}'
751           refspec: '{extra-refspec1}'
752           branch: '{extra-branch1}'
753           checkout-dir: '{checkout-dir1}'
754       - git-extra-project:
755           project: '{extra-project2}'
756           refspec: '{extra-refspec2}'
757           branch: '{extra-branch2}'
758           checkout-dir: '{checkout-dir2}'
759
760     wrappers:
761       - ecomp-infra-wrappers:
762           build-timeout: '{build-timeout}'
763
764     triggers:
765       # 12 AM UTC
766       - timed: 'H 12 * * *'
767       - gerrit-trigger-release-manually:
768           server: '{server-name}'
769           project: '{project}'
770           branch: '{branch}'
771
772     builders:
773       - provide-maven-settings:
774           global-settings-file: 'global-settings'
775           settings-file: '{mvn-settings}'
776       - docker-login
777       # make sure maven gets installed / setup
778       - maven-target:
779           maven-version: 'mvn33'
780           goals: '--version'
781           settings: '{mvn-settings}'
782           settings-type: cfp
783           global-settings: 'global-settings'
784           global-settings-type: cfp
785       - shell: '{script}'
786
787 #    publishers:
788 #      - ecomp-infra-shiplogs:
789 #          maven-version: 'mvn33'