Initial ci-management upload
[ci-management.git] / jjb / global-templates-java.yaml
1 ---
2 - job-template:
3     # Job template for Java verify jobs
4     #
5     # The purpose of this job template is to run "maven clean install" for
6     # projects using this template.
7     #
8     # Required Variables:
9     #     branch:    git branch (eg. stable/lithium or master)
10
11     name: '{project}-{stream}-verify-java'
12
13     project-type: freestyle
14     concurrent: true
15     node: '{build-node}'
16
17     properties:
18       - build-discarder:
19           days-to-keep: '{build-days-to-keep}'
20           num-to-keep: '{build-num-to-keep}'
21           artifact-days-to-keep: '{build-artifact-days-to-keep}'
22           artifact-num-to-keep: '{build-artifact-num-to-keep}'
23
24     parameters:
25       - ecomp-infra-parameters:
26           project: '{project}'
27           branch: '{branch}'
28           refspec: 'refs/heads/{branch}'
29
30     scm:
31       - gerrit-trigger-scm:
32           refspec: '$GERRIT_REFSPEC'
33           choosing-strategy: 'gerrit'
34
35     wrappers:
36       - ecomp-infra-wrappers:
37           build-timeout: '{build-timeout}'
38
39     triggers:
40       - gerrit-trigger-patch-submitted:
41           name: '{project}'
42           branch: '{branch}'
43
44     builders:
45       - provide-maven-settings:
46           global-settings-file: 'global-settings'
47           settings-file: '{mvn-settings}'
48       - maven-target:
49           maven-version: 'mvn33'
50           goals: 'clean install'
51           settings: '{mvn-settings}'
52           settings-type: cfp
53           global-settings: 'global-settings'
54           global-settings-type: cfp
55
56     publishers:
57       - ecomp-infra-shiplogs:
58           maven-version: 'mvn33'
59
60 - job-template:
61     # Job template for Java verify jobs with POM not at the root
62     #
63     # The purpose of this job template is to run "maven clean install" for
64     # projects using this template.
65     #
66     # Required Variables:
67     #     branch:    git branch (eg. stable/lithium or master)
68     #     pom:       name/location of the pom.xml file relative to the workspace
69     #     pattern:   ant file-path pattern relative to the workspace used to
70     #                trigger the job
71
72     name: '{project}-{stream}-{subproject}-verify-java'
73
74     project-type: freestyle
75     concurrent: true
76     node: '{build-node}'
77
78     properties:
79       - build-discarder:
80           days-to-keep: '{build-days-to-keep}'
81           num-to-keep: '{build-num-to-keep}'
82           artifact-days-to-keep: '{build-artifact-days-to-keep}'
83           artifact-num-to-keep: '{build-artifact-num-to-keep}'
84
85     parameters:
86       - ecomp-infra-parameters:
87           project: '{project}'
88           branch: '{branch}'
89           refspec: 'refs/heads/{branch}'
90
91     scm:
92       - gerrit-trigger-scm:
93           refspec: '$GERRIT_REFSPEC'
94           choosing-strategy: 'gerrit'
95
96     wrappers:
97       - ecomp-infra-wrappers:
98           build-timeout: '{build-timeout}'
99
100     triggers:
101       - gerrit-trigger-patch-submitted-pattern:
102           name: '{project}'
103           branch: '{branch}'
104           pattern: '{pattern}'
105
106     builders:
107       - provide-maven-settings:
108           global-settings-file: 'global-settings'
109           settings-file: '{mvn-settings}'
110       - maven-target:
111           maven-version: 'mvn33'
112           pom: '{pom}'
113           goals: 'clean install'
114           settings: '{mvn-settings}'
115           settings-type: cfp
116           global-settings: 'global-settings'
117           global-settings-type: cfp
118
119     publishers:
120       - ecomp-infra-shiplogs:
121           maven-version: 'mvn33'
122
123 - job-template:
124     # Job template for Java merge jobs
125     #
126     # The purpose of this job template is to run "maven clean deploy" for
127     # projects using this template.
128     #
129     # Required Variables:
130     #     branch:    git branch (eg. stable/lithium or master)
131     name: '{project}-{stream}-merge-java'
132
133     project-type: freestyle
134     node: '{build-node}'
135
136     properties:
137       - build-discarder:
138           days-to-keep: '{build-days-to-keep}'
139           num-to-keep: '{build-num-to-keep}'
140           artifact-days-to-keep: '{build-artifact-days-to-keep}'
141           artifact-num-to-keep: '{build-artifact-num-to-keep}'
142
143     parameters:
144       - ecomp-infra-parameters:
145           project: '{project}'
146           branch: '{branch}'
147           refspec: 'refs/heads/{branch}'
148
149     scm:
150       - gerrit-trigger-scm:
151           refspec: ''
152           choosing-strategy: 'default'
153
154     wrappers:
155       - ecomp-infra-wrappers:
156           build-timeout: '{build-timeout}'
157
158     triggers:
159       - gerrit-trigger-patch-merged:
160           name: '{project}'
161           branch: '{branch}'
162
163     builders:
164       - provide-maven-settings:
165           global-settings-file: 'global-settings'
166           settings-file: '{mvn-settings}'
167       - maven-target:
168           maven-version: 'mvn33'
169           # yamllint disable rule:line-length
170           goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.open-o.org'
171           # yamllint enable
172           settings: '{mvn-settings}'
173           settings-type: cfp
174           global-settings: 'global-settings'
175           global-settings-type: cfp
176
177     publishers:
178       - ecomp-infra-shiplogs:
179           maven-version: 'mvn33'
180
181 - job-template:
182     # Job template for Java merge jobs with POM not at the root
183     #
184     # The purpose of this job template is to run "maven clean deploy" for
185     # projects using this template.
186     #
187     # Required Variables:
188     #     branch:    git branch (eg. stable/lithium or master)
189     #     pom:       name/location of the pom.xml file relative to the workspace
190     #     pattern:   ant file-path pattern relative to the workspace used to
191     #                trigger the job
192
193     name: '{project}-{stream}-{subproject}-merge-java'
194
195     project-type: freestyle
196     node: '{build-node}'
197
198     properties:
199       - build-discarder:
200           days-to-keep: '{build-days-to-keep}'
201           num-to-keep: '{build-num-to-keep}'
202           artifact-days-to-keep: '{build-artifact-days-to-keep}'
203           artifact-num-to-keep: '{build-artifact-num-to-keep}'
204
205     parameters:
206       - ecomp-infra-parameters:
207           project: '{project}'
208           branch: '{branch}'
209           refspec: 'refs/heads/{branch}'
210
211     scm:
212       - gerrit-trigger-scm:
213           refspec: ''
214           choosing-strategy: 'default'
215
216     wrappers:
217       - ecomp-infra-wrappers:
218           build-timeout: '{build-timeout}'
219
220     triggers:
221       - gerrit-trigger-patch-merged-pattern:
222           name: '{project}'
223           branch: '{branch}'
224           pattern: '{pattern}'
225
226     builders:
227       - provide-maven-settings:
228           global-settings-file: 'global-settings'
229           settings-file: '{mvn-settings}'
230       - maven-target:
231           maven-version: 'mvn33'
232           pom: '{pom}'
233           # yamllint disable rule:line-length
234           goals: 'clean deploy sonar:sonar -Dsonar.host.url=https://sonar.open-o.org'
235           # yamllint enable
236           settings: '{mvn-settings}'
237           settings-type: cfp
238           global-settings: 'global-settings'
239           global-settings-type: cfp
240
241     publishers:
242       - ecomp-infra-shiplogs:
243           maven-version: 'mvn33'