Make integration jobs also publish their artifacts
[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
193 - job-template:
194     name: 'PROJECT-integration-{stream}'
195     disabled: DISABLED
196
197     # Job template for ODL merge jobs
198     #
199     # The purpose of this job template is to setup a ODL merge job
200     # and deploy artifacts to Nexus.
201     #
202     # Required Variables:
203     #     stream:    branch with - in place of / (eg. stable-helium)
204     #     branch:    branch (eg. stable/helium)
205
206     project-type: maven
207     node: dynamic_merge
208     jdk: '{jdk}'
209
210     logrotate:
211         daysToKeep: '{build-days-to-keep}'
212         numToKeep: '{build-num-to-keep}'
213         artifactDaysToKeep: '{build-artifact-days-to-keep}'
214         artifactNumToKeep: '{build-artifact-num-to-keep}'
215
216     parameters:
217         - project-parameter:
218             project: '{project}'
219
220     scm:
221         - git-scm:
222             credentials-id: '{ssh-credentials}'
223             refspec: ''
224             branch: '{branch}'
225
226     wrappers:
227         - build-timeout
228         - ssh-agent-credentials:
229             user: '{ssh-credentials}'
230
231     triggers:
232         - reverse:
233             jobs: 'DEPENDENCIES'
234             result: 'success'
235
236     maven:
237         maven-name: '{mvn32}'
238         root-pom: 'pom.xml'
239         goals: 'MAVEN_GOALS'
240         maven-opts: 'MAVEN_OPTS'
241         settings: '{PROJECT-settings}'
242         global-settings: '{odl-global-settings}'
243
244     publishers:
245         - email-notification:
246             email-prefix: 'EMAIL_PREFIX'
247         - maven-deploy:
248             id: ''
249             unique-version: true
250             deploy-unstable: false
251
252 - job-template:
253     name: 'PROJECT-sonar'
254
255     project-type: maven
256     node: dynamic_verify
257     jdk: '{jdk}'
258
259     logrotate:
260         daysToKeep: '7'
261         numToKeep: '10'
262         artifactDaysToKeep: '1'
263         artifactNumToKeep: '1'
264
265     parameters:
266         - project-parameter:
267             project: '{project}'
268
269     scm:
270         - git-scm:
271             credentials-id: '{ssh-credentials}'
272             refspec: ''
273             branch: 'SONAR_BRANCH'
274
275     wrappers:
276         - build-timeout
277         - ssh-agent-credentials:
278             user: '{ssh-credentials}'
279
280     triggers:
281         - timed: 'H H * * *'
282
283     maven:
284         maven-name: '{mvn32}'
285         root-pom: 'pom.xml'
286         goals: 'validate'
287         maven-opts: 'MAVEN_OPTS'
288         settings: '{PROJECT-settings}'
289         global-settings: '{odl-global-settings}'
290
291     publishers:
292         - sonar:
293             language: 'java'
294             maven-opts: '-Xmx6144m -XX:MaxPermSize=1024m'
295         - email-notification:
296             email-prefix: '[PROJECT]'