Bug 8033: Change path_mtu to fix mtu tempest test
[releng/builder.git] / jjb / releng-templates.yaml
1 ---
2 - job-template:
3     name: '{project-name}-release-java'
4
5     # Job template for producing a release candidate by creating a staging repo
6     # in Nexus.
7
8     project-type: freestyle
9     node: '{build-node}'
10     jdk: '{jdk}'
11
12     properties:
13       - opendaylight-infra-properties:
14           build-days-to-keep: 30
15
16     parameters:
17       - opendaylight-infra-parameters:
18           project: '{project}'
19           branch: '{branch}'
20           refspec: 'refs/heads/{branch}'
21           artifacts: '{archive-artifacts}'
22       - build-tag
23       - stage-id-parameter:
24           stage-id: '{stage-id}'
25
26     scm:
27       - git:
28           credentials-id: 'opendaylight-jenkins-ssh'
29           url: '$GIT_BASE'
30           branches:
31             - '$BUILD_TAG'
32           skip-tag: true
33           shallow-clone: true
34           wipe-workspace: true
35
36     wrappers:
37       - opendaylight-infra-wrappers:
38           build-timeout: '{build-timeout}'
39
40     builders:
41       - wipe-org-opendaylight-repo
42       - jacoco-nojava-workaround
43       - provide-maven-settings:
44           global-settings-file: 'odl-global-settings'
45           settings-file: 'autorelease-settings'
46       - maven-target:
47           maven-version: 'mvn33'
48           pom: 'pom.xml'
49           goals: >
50               clean deploy -V -B
51               -Dmaven.repo.local=/tmp/r
52               -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
53               -Djenkins
54               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
55           java-opts:
56             - '-Xmx1024m -XX:MaxPermSize=256m'
57           settings: 'autorelease-settings'
58           settings-type: cfp
59           global-settings: 'odl-global-settings'
60           global-settings-type: cfp
61       - releng-stage-release
62
63     publishers:
64       - email-notification:
65           email-recipients: '{email-recipients}'
66           email-prefix: '[releng]'
67       - opendaylight-infra-shiplogs:
68           maven-version: 'mvn33'
69
70
71 - job-template:
72     name: '{project-name}-publish-p2repo'
73
74     # Job template for publishing a p2 repo given a URL to a zipped p2repo.
75
76     project-type: freestyle
77     node: '{build-node}'
78     jdk: '{jdk}'
79
80     parameters:
81       - opendaylight-infra-parameters:
82           project: '{project}'
83           branch: '{branch}'
84           refspec: 'refs/heads/{branch}'
85           artifacts: '{archive-artifacts}'
86       - p2zip-parameter
87
88     wrappers:
89       - opendaylight-infra-wrappers:
90           build-timeout: '{build-timeout}'
91
92     builders:
93       - wipe-org-opendaylight-repo
94       - jacoco-nojava-workaround
95       - releng-fetch-p2zip-if-necessary:
96           maven-version: 'mvn33'
97           settings: '{mvn-settings}'
98           global-settings: 'odl-global-settings'
99       - releng-generate-p2pom
100       - maven-target:
101           maven-version: 'mvn33'
102           pom: 'pom.xml'
103           goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
104           settings: '{mvn-settings}'
105           settings-type: cfp
106           global-settings: 'odl-global-settings'
107           global-settings-type: cfp
108       - releng-update-p2composite-metadata:
109           maven-version: 'mvn33'
110           settings: '{mvn-settings}'
111           global-settings: 'odl-global-settings'
112
113     publishers:
114       - email-notification:
115           email-recipients: '{email-recipients}'
116           email-prefix: '[releng]'
117       - opendaylight-infra-shiplogs:
118           maven-version: 'mvn33'
119
120 # Generic tox-based verify action
121
122 - tox_builder_verify: &tox_builder_verify
123     name: tox_builder_verify
124
125     # Required Variables:
126     #     branch:    git branch (eg. stable/boron or master)
127     #     toxdir:    directory containing the project's tox.ini relative to
128     #                the workspace. Empty works if tox.ini is at project root.
129     # Note that stream value is not needed.
130
131     project-type: freestyle
132     node: '{build-node}'
133     concurrent: true
134
135     properties:
136       - opendaylight-infra-properties:
137           build-days-to-keep: 7
138
139     parameters:
140       - opendaylight-infra-parameters:
141           project: '{project}'
142           branch: '{branch}'
143           refspec: 'refs/heads/{branch}'
144           artifacts: '{archive-artifacts}'
145
146     scm:
147       - git:
148           credentials-id: 'opendaylight-jenkins-ssh'
149           url: '$GIT_BASE'
150           basedir: 'repo'
151           refspec: '$GERRIT_REFSPEC'
152           branches:
153             - 'origin/$GERRIT_BRANCH'
154           skip-tag: true
155           choosing-strategy: 'gerrit'
156
157     wrappers:
158       - opendaylight-infra-wrappers:
159           build-timeout: '{build-timeout}'
160
161     triggers:
162       - gerrit-trigger-patch-submitted:
163           server: '{server-name}'
164           project: '{project}'
165           branch: '{branch}'
166           files: '{toxdir}/**'
167
168     builders:
169       - shell: |
170           virtualenv $WORKSPACE/venv-tox
171           source $WORKSPACE/venv-tox/bin/activate
172           pip install --upgrade pip
173           pip install --upgrade tox argparse
174           pip freeze
175           cd $WORKSPACE/repo/{toxdir}
176           tox
177
178     publishers:
179       - email-notification:
180           email-recipients: '{email-recipients}'
181           email-prefix: '[{project}]'
182       - opendaylight-infra-shiplogs:
183           maven-version: 'mvn33'
184
185 - job-template:
186     name: '{project-name}-verify-tox-{stream}'
187
188     # Job template for verify jobs executing tox envlist
189     #
190     # The purpose of this job template is to run tox for projects using this
191     # template.
192     #
193     # Required Variables:
194     #     stream:    release stream (eg. stable-lithium or beryllium)
195     #     branch:    git branch (eg. stable/lithium or master)
196     #     toxdir:    directory containing the project's tox.ini relative to
197     #                the workspace. Empty works if tox.ini is at project root.
198
199     <<: *tox_builder_verify
200
201 # Specification for projects outside release cycle, to avoid referring a stream.
202 # This is useful mailny for integration-test-jobs, which defines streams for Integration/Distribution,
203 # but the tox job is related to Integration/Test only.
204
205 - job-template:
206     name: '{project-name}-verify-tox-master'
207
208     # Job template for verify jobs executing tox envlist
209     #
210     # The purpose of this job template is to run tox for projects using this
211     # template.
212     #
213     # Required Variables:
214     #     toxdir:    directory containing the project's tox.ini relative to
215     #                the workspace. Empty works if tox.ini is at project root.
216
217     branch: master
218
219     <<: *tox_builder_verify
220
221 # Python (pep8) specific, project should migrate to {project-name}-verify-tox-{stream}
222
223 - job-template:
224     name: '{project-name}-verify-python-{stream}'
225
226     # Job template for python verify jobs
227     #
228     # The purpose of this job template is to run tox for projects using this
229     # template.
230     #
231     # Required Variables:
232     #     stream:    release stream (eg. stable-lithium or beryllium)
233     #     branch:    git branch (eg. stable/lithium or master)
234     #     toxdir:    directory containing the project's tox.ini relative to
235     #                the workspace. Empty works if tox.ini is at project root.
236
237     <<: *tox_builder_verify
238
239 - job-template:
240     name: '{project-name}-merge-rtd-{stream}'
241     # Template for ReadTheDocs triggering
242
243     project-type: freestyle
244     node: '{build-node}'
245     concurrent: false
246
247     parameters:
248       - opendaylight-infra-parameters:
249           project: '{project}'
250           branch: '{branch}'
251           refspec: 'refs/heads/{branch}'
252           artifacts: '{archive-artifacts}'
253
254     wrappers:
255       - opendaylight-infra-wrappers:
256           build-timeout: '{build-timeout}'
257
258     triggers:
259       - gerrit-trigger-patch-merged:
260           server-name: '{server-name}'
261           name: '{project}'
262           branch: '{branch}'
263
264     builders:
265       - shell: |
266           curl -X POST https://readthedocs.org/build/{rtdproject}
267
268     publishers:
269       - email-notification:
270           email-recipients: '{email-recipients}'
271           email-prefix: '[{project}]'
272       - opendaylight-infra-shiplogs:
273           maven-version: 'mvn33'
274
275 # Node related
276
277 - job-template:
278     name: '{project-name}-verify-node-{stream}'
279
280     # Job template for python verify jobs
281     #
282     # The purpose of this job template is to run node tests for projects using
283     # this template. It uses python virtualenv to install nodeenv and create a
284     # virtualenv for nodejs.
285     #
286     # Required Variables:
287     #     stream:    release stream (eg. boron or carbon)
288     #     branch:    git branch (eg. stable/boron or master)
289     #     nodedir:   directory of nodejs project to run node test against
290     #     nodever:   version of node to install in virtualenv
291
292     project-type: freestyle
293     node: '{build-node}'
294     concurrent: true
295
296     properties:
297       - opendaylight-infra-properties:
298           build-days-to-keep: 7
299
300     parameters:
301       - opendaylight-infra-parameters:
302           project: '{project}'
303           branch: '{branch}'
304           refspec: 'refs/heads/{branch}'
305           artifacts: '{archive-artifacts}'
306
307     scm:
308       - git:
309           credentials-id: 'opendaylight-jenkins-ssh'
310           url: '$GIT_BASE'
311           basedir: 'repo'
312           refspec: '$GERRIT_REFSPEC'
313           branches:
314             - 'origin/$GERRIT_BRANCH'
315           skip-tag: true
316           choosing-strategy: 'gerrit'
317
318     wrappers:
319       - opendaylight-infra-wrappers:
320           build-timeout: '{build-timeout}'
321
322     triggers:
323       - gerrit-trigger-patch-submitted:
324           server: '{server-name}'
325           project: '{project}'
326           branch: '{branch}'
327           files: '{nodedir}/**'
328
329     builders:
330       - shell: |
331           #!/bin/bash
332           # Prepare Python
333           virtualenv $WORKSPACE/venv-python
334           source $WORKSPACE/venv-python/bin/activate
335           pip install --upgrade pip
336           pip install --upgrade tox argparse nodeenv
337           pip freeze
338
339           # Prepare node
340           nodeenv --node={nodever} --prebuilt $WORKSPACE/venv-node
341           source $WORKSPACE/venv-node/bin/activate
342           cd $WORKSPACE/repo/{nodedir}
343           npm install
344           npm test
345
346     publishers:
347       - email-notification:
348           email-recipients: '{email-recipients}'
349           email-prefix: '[{project}]'
350       - opendaylight-infra-shiplogs:
351           maven-version: 'mvn33'