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