Archive control node nova.conf
[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           submodule:
157             recursive: true
158
159     wrappers:
160       - opendaylight-infra-wrappers:
161           build-timeout: '{build-timeout}'
162
163     triggers:
164       - gerrit-trigger-patch-submitted:
165           server: '{server-name}'
166           project: '{project}'
167           branch: '{branch}'
168           files: '{toxdir}/**'
169
170     builders:
171       - shell: |
172           virtualenv $WORKSPACE/venv-tox
173           source $WORKSPACE/venv-tox/bin/activate
174           pip install --upgrade pip
175           pip install --upgrade tox argparse
176           pip freeze
177           cd $WORKSPACE/repo/{toxdir}
178           tox
179
180     publishers:
181       - email-notification:
182           email-recipients: '{email-recipients}'
183           email-prefix: '[{project}]'
184       - opendaylight-infra-shiplogs:
185           maven-version: 'mvn33'
186
187 - job-template:
188     name: '{project-name}-verify-tox-{stream}'
189
190     # Job template for verify jobs executing tox envlist
191     #
192     # The purpose of this job template is to run tox for projects using this
193     # template.
194     #
195     # Required Variables:
196     #     stream:    release stream (eg. stable-lithium or beryllium)
197     #     branch:    git branch (eg. stable/lithium or master)
198     #     toxdir:    directory containing the project's tox.ini relative to
199     #                the workspace. Empty works if tox.ini is at project root.
200
201     <<: *tox_builder_verify
202
203 # Specification for projects outside release cycle, to avoid referring a stream.
204 # This is useful mailny for integration-test-jobs, which defines streams for Integration/Distribution,
205 # but the tox job is related to Integration/Test only.
206
207 - job-template:
208     name: '{project-name}-verify-tox-master'
209
210     # Job template for verify jobs executing tox envlist
211     #
212     # The purpose of this job template is to run tox for projects using this
213     # template.
214     #
215     # Required Variables:
216     #     toxdir:    directory containing the project's tox.ini relative to
217     #                the workspace. Empty works if tox.ini is at project root.
218
219     branch: master
220
221     <<: *tox_builder_verify
222
223 # Python (pep8) specific, project should migrate to {project-name}-verify-tox-{stream}
224
225 - job-template:
226     name: '{project-name}-verify-python-{stream}'
227
228     # Job template for python verify jobs
229     #
230     # The purpose of this job template is to run tox for projects using this
231     # template.
232     #
233     # Required Variables:
234     #     stream:    release stream (eg. stable-lithium or beryllium)
235     #     branch:    git branch (eg. stable/lithium or master)
236     #     toxdir:    directory containing the project's tox.ini relative to
237     #                the workspace. Empty works if tox.ini is at project root.
238
239     <<: *tox_builder_verify
240
241 - job-template:
242     name: '{project-name}-merge-rtd-{stream}'
243     # Template for ReadTheDocs triggering
244
245     project-type: freestyle
246     node: '{build-node}'
247     concurrent: false
248
249     parameters:
250       - opendaylight-infra-parameters:
251           project: '{project}'
252           branch: '{branch}'
253           refspec: 'refs/heads/{branch}'
254           artifacts: '{archive-artifacts}'
255
256     wrappers:
257       - opendaylight-infra-wrappers:
258           build-timeout: '{build-timeout}'
259
260     triggers:
261       - gerrit-trigger-patch-merged:
262           server-name: '{server-name}'
263           name: '{project}'
264           branch: '{branch}'
265
266     builders:
267       - shell: |
268           curl -X POST https://readthedocs.org/build/{rtdproject}
269
270     publishers:
271       - email-notification:
272           email-recipients: '{email-recipients}'
273           email-prefix: '[{project}]'
274       - opendaylight-infra-shiplogs:
275           maven-version: 'mvn33'
276
277 # Node related
278
279 - job-template:
280     name: '{project-name}-verify-node-{stream}'
281
282     # Job template for python verify jobs
283     #
284     # The purpose of this job template is to run node tests for projects using
285     # this template. It uses python virtualenv to install nodeenv and create a
286     # virtualenv for nodejs.
287     #
288     # Required Variables:
289     #     stream:    release stream (eg. boron or carbon)
290     #     branch:    git branch (eg. stable/boron or master)
291     #     nodedir:   directory of nodejs project to run node test against
292     #     nodever:   version of node to install in virtualenv
293
294     project-type: freestyle
295     node: '{build-node}'
296     concurrent: true
297
298     properties:
299       - opendaylight-infra-properties:
300           build-days-to-keep: 7
301
302     parameters:
303       - opendaylight-infra-parameters:
304           project: '{project}'
305           branch: '{branch}'
306           refspec: 'refs/heads/{branch}'
307           artifacts: '{archive-artifacts}'
308
309     scm:
310       - git:
311           credentials-id: 'opendaylight-jenkins-ssh'
312           url: '$GIT_BASE'
313           basedir: 'repo'
314           refspec: '$GERRIT_REFSPEC'
315           branches:
316             - 'origin/$GERRIT_BRANCH'
317           skip-tag: true
318           choosing-strategy: 'gerrit'
319
320     wrappers:
321       - opendaylight-infra-wrappers:
322           build-timeout: '{build-timeout}'
323
324     triggers:
325       - gerrit-trigger-patch-submitted:
326           server: '{server-name}'
327           project: '{project}'
328           branch: '{branch}'
329           files: '{nodedir}/**'
330
331     builders:
332       - shell: |
333           #!/bin/bash
334           # Prepare Python
335           virtualenv $WORKSPACE/venv-python
336           source $WORKSPACE/venv-python/bin/activate
337           pip install --upgrade pip
338           pip install --upgrade tox argparse nodeenv
339           pip freeze
340
341           # Prepare node
342           nodeenv --node={nodever} --prebuilt $WORKSPACE/venv-node
343           source $WORKSPACE/venv-node/bin/activate
344           cd $WORKSPACE/repo/{nodedir}
345           npm install
346           npm test
347
348     publishers:
349       - email-notification:
350           email-recipients: '{email-recipients}'
351           email-prefix: '[{project}]'
352       - opendaylight-infra-shiplogs:
353           maven-version: 'mvn33'