Add integration job to common template
[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
14     # stream:    branch with - in place of / (eg. stable-helium)
15     # branch:    branch (eg. stable/helium)
16     stream:
17         - master:
18             branch: 'master'
19         - stable-helium:
20             branch: 'stable/helium'
21
22     project: 'PROJECT'
23     jdk: 'openjdk7'
24
25 # For the Job templates below replace instances of:
26 # PROJECT with your project name (eg. controller)
27 # MAVEN_GOALS with your maven goals to build
28 # MAVEN_OPTS with your maven options to build
29
30 - job-template:
31     name: 'PROJECT-verify-{stream}'
32
33     # Job template for ODL verify jobs
34     #
35     # The purpose of this job template is to setup a ODL verify job
36     #
37     # Required Variables:
38     #     stream:    branch with - in place of / (eg. stable-helium)
39     #     branch:    branch (eg. stable/helium)
40
41     project-type: maven
42     node: dynamic_verify
43     jdk: '{jdk}'
44
45     logrotate:
46         daysToKeep: '{build-days-to-keep}'
47         numToKeep: '{build-num-to-keep}'
48         artifactDaysToKeep: '{build-artifact-days-to-keep}'
49         artifactNumToKeep: '{build-artifact-num-to-keep}'
50
51     parameters:
52         - project-parameter:
53             project: '{project}'
54         - gerrit-parameter:
55             branch: '{branch}'
56
57     scm:
58         - gerrit-trigger-scm:
59             credentials-id: '{ssh-credentials}'
60             refspec: '$GERRIT_REFSPEC'
61             choosing-strategy: 'gerrit'
62
63     wrappers:
64         - ssh-agent-credentials:
65             user: '{ssh-credentials}'
66
67     triggers:
68         - gerrit-trigger-patch-submitted:
69             name: 'PROJECT'
70             branch: '{branch}'
71
72     maven:
73         maven-name: '{mvn32}'
74         root-pom: 'pom.xml'
75         goals: 'MAVEN_GOALS'
76         maven-opts: 'MAVEN_OPTS'
77         settings: '{PROJECT-settings}'
78         global-settings: '{odl-global-settings}'
79         ignore-upstream-changes: true
80
81     publishers:
82         - email-notification:
83             email-prefix: '[PROJECT]'
84
85 - job-template:
86     name: 'PROJECT-merge-{stream}'
87
88     # Job template for ODL merge jobs
89     #
90     # The purpose of this job template is to setup a ODL merge job
91     # and deploy artifacts to Nexus.
92     #
93     # Required Variables:
94     #     stream:    branch with - in place of / (eg. stable-helium)
95     #     branch:    branch (eg. stable/helium)
96
97     project-type: maven
98     node: dynamic_merge
99     jdk: '{jdk}'
100
101     logrotate:
102         daysToKeep: '{build-days-to-keep}'
103         numToKeep: '{build-num-to-keep}'
104         artifactDaysToKeep: '{build-artifact-days-to-keep}'
105         artifactNumToKeep: '{build-artifact-num-to-keep}'
106
107     parameters:
108         - project-parameter:
109             project: '{project}'
110
111     scm:
112         - gerrit-trigger-scm:
113             credentials-id: '{ssh-credentials}'
114             refspec: ''
115             choosing-strategy: 'default'
116
117     wrappers:
118         - ssh-agent-credentials:
119             user: '{ssh-credentials}'
120
121     triggers:
122         - gerrit-trigger-patch-merged:
123             name: 'PROJECT'
124             branch: '{branch}'
125
126     maven:
127         maven-name: '{mvn32}'
128         root-pom: 'pom.xml'
129         goals: 'MAVEN_GOALS'
130         maven-opts: 'MAVEN_OPTS'
131         settings: '{PROJECT-settings}'
132         global-settings: '{odl-global-settings}'
133
134     publishers:
135         - email-notification:
136             email-prefix: '[PROJECT]'
137         - maven-deploy:
138             id: ''
139             unique-version: true
140             deploy-unstable: false
141
142 - job-template:
143     name: 'PROJECT-daily-{stream}'
144
145     # Job template for daily builders
146     #
147     # The purpose of this job template is to setup a daily/nightly
148     # builder and pushes to Sonar analysis.
149     #
150     # Required Variables:
151     #     stream:    branch with - in place of / (eg. stable-helium)
152     #     branch:    branch (eg. stable/helium)
153
154     project-type: maven
155     node: dynamic_verify
156     jdk: '{jdk}'
157
158     logrotate:
159         daysToKeep: '{build-days-to-keep}'
160         numToKeep: '{build-num-to-keep}'
161         artifactDaysToKeep: '{build-artifact-days-to-keep}'
162         artifactNumToKeep: '{build-artifact-num-to-keep}'
163
164     parameters:
165         - project-parameter:
166             project: '{project}'
167
168     scm:
169         - git-scm:
170             credentials-id: '{ssh-credentials}'
171             refspec: ''
172             branch: '{branch}'
173
174     wrappers:
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         - sonar:
193             branch: '{stream}'
194             language: 'java'
195             maven-opts: 'MAVEN_OPTS'
196
197 - job-template:
198     name: 'PROJECT-integration-{stream}'
199     disabled: DISABLED
200
201     # Job template for ODL merge jobs
202     #
203     # The purpose of this job template is to setup a ODL merge job
204     # and deploy artifacts to Nexus.
205     #
206     # Required Variables:
207     #     stream:    branch with - in place of / (eg. stable-helium)
208     #     branch:    branch (eg. stable/helium)
209
210     project-type: maven
211     node: dynamic_merge
212     jdk: '{jdk}'
213
214     logrotate:
215         daysToKeep: '{build-days-to-keep}'
216         numToKeep: '{build-num-to-keep}'
217         artifactDaysToKeep: '{build-artifact-days-to-keep}'
218         artifactNumToKeep: '{build-artifact-num-to-keep}'
219
220     parameters:
221         - project-parameter:
222             project: '{project}'
223
224     scm:
225         - gerrit-trigger-scm:
226             credentials-id: '{ssh-credentials}'
227             refspec: ''
228             choosing-strategy: 'default'
229
230     wrappers:
231         - ssh-agent-credentials:
232             user: '{ssh-credentials}'
233
234     triggers:
235         - reverse:
236             jobs: 'DEPENDENCIES'
237             result: 'success'
238
239     maven:
240         maven-name: '{mvn32}'
241         root-pom: 'pom.xml'
242         goals: 'MAVEN_GOALS'
243         maven-opts: 'MAVEN_OPTS'
244         settings: '{PROJECT-settings}'
245         global-settings: '{odl-global-settings}'
246
247     publishers:
248         - email-notification:
249             email-prefix: 'EMAIL_PREFIX'