Update automated project templates
[releng/builder.git] / jjb / job.yaml.template
1 # REMOVE THIS LINE IF YOU WANT TO CUSTOMIZE ANYTHING BELOW
2 # Otherwise this file will be automatically overwritten by the template
3 # autobuilder.
4
5 # ODL Releng build templates
6 - project:
7     name: PROJECT
8     jobs:
9         - 'PROJECT-verify-{stream}'
10         - 'PROJECT-merge-{stream}'
11         - 'PROJECT-daily-{stream}'
12         - 'PROJECT-integration-{stream}'
13         - 'PROJECT-sonar'
14
15     # stream:    branch with - in place of / (eg. stable-helium)
16     # branch:    branch (eg. stable/helium)
17     STREAMS
18     project: 'PROJECT'
19     jdk: 'openjdk7'
20
21 # For the Job templates below replace instances of:
22 # PROJECT with your project name (eg. controller)
23 # MAVEN_GOALS with your maven goals to build
24 # MAVEN_OPTS with your maven options to build
25
26 - job-template:
27     name: 'PROJECT-verify-{stream}'
28
29     # Job template for ODL verify jobs
30     #
31     # The purpose of this job template is to setup a ODL verify job
32     #
33     # Required Variables:
34     #     stream:    branch with - in place of / (eg. stable-helium)
35     #     branch:    branch (eg. stable/helium)
36
37     project-type: maven
38     node: dynamic_verify
39     concurrent: true
40     jdk: '{jdk}'
41
42     logrotate:
43         daysToKeep: '{build-days-to-keep}'
44         numToKeep: '{build-num-to-keep}'
45         artifactDaysToKeep: '{build-artifact-days-to-keep}'
46         artifactNumToKeep: '{build-artifact-num-to-keep}'
47
48     parameters:
49         - project-parameter:
50             project: '{project}'
51         - gerrit-parameter:
52             branch: '{branch}'
53
54     scm:
55         - gerrit-trigger-scm:
56             credentials-id: '{ssh-credentials}'
57             refspec: '$GERRIT_REFSPEC'
58             choosing-strategy: 'gerrit'
59
60     wrappers:
61         - build-timeout
62         - ssh-agent-credentials:
63             user: '{ssh-credentials}'
64
65     triggers:
66         - gerrit-trigger-patch-submitted:
67             name: 'PROJECT'
68             branch: '{branch}'
69
70     maven:
71         maven-name: '{mvn32}'
72         root-pom: 'pom.xml'
73         goals: 'MAVEN_GOALS'
74         maven-opts: 'MAVEN_OPTS'
75         settings: '{PROJECT-settings}'
76         global-settings: '{odl-global-settings}'
77         ignore-upstream-changes: true
78
79     publishers:
80         - email-notification:
81             email-prefix: '[PROJECT]'
82
83 - job-template:
84     name: 'PROJECT-merge-{stream}'
85
86     # Job template for ODL merge jobs
87     #
88     # The purpose of this job template is to setup a ODL merge job
89     # and deploy artifacts to Nexus.
90     #
91     # Required Variables:
92     #     stream:    branch with - in place of / (eg. stable-helium)
93     #     branch:    branch (eg. stable/helium)
94
95     project-type: maven
96     node: dynamic_merge
97     jdk: '{jdk}'
98
99     logrotate:
100         daysToKeep: '{build-days-to-keep}'
101         numToKeep: '{build-num-to-keep}'
102         artifactDaysToKeep: '{build-artifact-days-to-keep}'
103         artifactNumToKeep: '{build-artifact-num-to-keep}'
104
105     parameters:
106         - project-parameter:
107             project: '{project}'
108
109     scm:
110         - gerrit-trigger-scm:
111             credentials-id: '{ssh-credentials}'
112             refspec: ''
113             choosing-strategy: 'default'
114
115     wrappers:
116         - build-timeout
117         - ssh-agent-credentials:
118             user: '{ssh-credentials}'
119
120     triggers:
121         - gerrit-trigger-patch-merged:
122             name: 'PROJECT'
123             branch: '{branch}'
124
125     maven:
126         maven-name: '{mvn32}'
127         root-pom: 'pom.xml'
128         goals: 'MAVEN_GOALS'
129         maven-opts: 'MAVEN_OPTS'
130         settings: '{PROJECT-settings}'
131         global-settings: '{odl-global-settings}'
132
133     publishers:
134         - email-notification:
135             email-prefix: '[PROJECT]'
136         - maven-deploy:
137             id: ''
138             unique-version: true
139             deploy-unstable: false
140
141 - job-template:
142     name: 'PROJECT-daily-{stream}'
143
144     # Job template for daily builders
145     #
146     # The purpose of this job template is to setup a daily/nightly
147     # builder and pushes to Sonar analysis.
148     #
149     # Required Variables:
150     #     stream:    branch with - in place of / (eg. stable-helium)
151     #     branch:    branch (eg. stable/helium)
152
153     project-type: maven
154     node: dynamic_verify
155     jdk: '{jdk}'
156
157     logrotate:
158         daysToKeep: '{build-days-to-keep}'
159         numToKeep: '{build-num-to-keep}'
160         artifactDaysToKeep: '{build-artifact-days-to-keep}'
161         artifactNumToKeep: '{build-artifact-num-to-keep}'
162
163     parameters:
164         - project-parameter:
165             project: '{project}'
166
167     scm:
168         - git-scm:
169             credentials-id: '{ssh-credentials}'
170             refspec: ''
171             branch: '{branch}'
172
173     wrappers:
174         - build-timeout
175         - ssh-agent-credentials:
176             user: '{ssh-credentials}'
177
178     triggers:
179         - timed: 'H H * * *'
180
181     maven:
182         maven-name: '{mvn32}'
183         root-pom: 'pom.xml'
184         goals: 'MAVEN_GOALS'
185         maven-opts: 'MAVEN_OPTS'
186         settings: '{PROJECT-settings}'
187         global-settings: '{odl-global-settings}'
188
189     publishers:
190         - email-notification:
191             email-prefix: '[PROJECT]'
192         - jacoco-report
193
194 - job-template:
195     name: 'PROJECT-integration-{stream}'
196     disabled: DISABLED
197
198     # Job template for ODL merge jobs
199     #
200     # The purpose of this job template is to setup a ODL merge job
201     # and deploy artifacts to Nexus.
202     #
203     # Required Variables:
204     #     stream:    branch with - in place of / (eg. stable-helium)
205     #     branch:    branch (eg. stable/helium)
206
207     project-type: maven
208     node: dynamic_merge
209     jdk: '{jdk}'
210
211     logrotate:
212         daysToKeep: '{build-days-to-keep}'
213         numToKeep: '{build-num-to-keep}'
214         artifactDaysToKeep: '{build-artifact-days-to-keep}'
215         artifactNumToKeep: '{build-artifact-num-to-keep}'
216
217     parameters:
218         - project-parameter:
219             project: '{project}'
220
221     scm:
222         - git-scm:
223             credentials-id: '{ssh-credentials}'
224             refspec: ''
225             branch: '{branch}'
226
227     wrappers:
228         - build-timeout
229         - ssh-agent-credentials:
230             user: '{ssh-credentials}'
231
232     triggers:
233         - reverse:
234             jobs: 'DEPENDENCIES'
235             result: 'success'
236
237     maven:
238         maven-name: '{mvn32}'
239         root-pom: 'pom.xml'
240         goals: 'MAVEN_GOALS'
241         maven-opts: 'MAVEN_OPTS'
242         settings: '{PROJECT-settings}'
243         global-settings: '{odl-global-settings}'
244
245     publishers:
246         - email-notification:
247             email-prefix: 'EMAIL_PREFIX'
248         - maven-deploy:
249             id: ''
250             unique-version: true
251             deploy-unstable: false
252
253 - job-template:
254     name: 'PROJECT-sonar'
255
256     project-type: maven
257     node: dynamic_verify
258     jdk: '{jdk}'
259
260     logrotate:
261         daysToKeep: '7'
262         numToKeep: '10'
263         artifactDaysToKeep: '1'
264         artifactNumToKeep: '1'
265
266     parameters:
267         - project-parameter:
268             project: '{project}'
269
270     scm:
271         - git-scm:
272             credentials-id: '{ssh-credentials}'
273             refspec: ''
274             branch: 'SONAR_BRANCH'
275
276     wrappers:
277         - build-timeout
278         - ssh-agent-credentials:
279             user: '{ssh-credentials}'
280
281     triggers:
282         - timed: 'H H * * *'
283
284     maven:
285         maven-name: '{mvn32}'
286         root-pom: 'pom.xml'
287         goals: 'MAVEN_GOALS'
288         maven-opts: 'MAVEN_OPTS'
289         settings: '{PROJECT-settings}'
290         global-settings: '{odl-global-settings}'
291
292     publishers:
293         - sonar:
294             language: 'java'
295             maven-opts: '-Xmx6144m -XX:MaxPermSize=1024m'
296         - email-notification:
297             email-prefix: '[PROJECT]'