824888e8c3e10f5035c83a2c0d07476a37c6df2d
[releng.git] / jjb / functest / functest.yml
1 ###################################
2 # job configuration for functest
3 ###################################
4 - project:
5     name: functest
6
7     pod:
8         - 'opnfv-jump-1'
9         - 'opnfv-jump-2'
10     jobs:
11         - 'functest-{pod}'
12         - 'functest-openstack-bench-test'
13         - 'functest-openstack-tempest-smoke-test'
14         - 'functest-odl-test'
15         - 'functest-vims-test'
16         - 'functest-vping-test'
17         - 'functest-daily-master'
18         - 'functest-merge'
19         - 'functest-verify-{stream}'
20
21     # stream:    branch with - in place of / (eg. stable-arno)
22     # branch:    branch (eg. stable/arno)
23     stream:
24         - master:
25             branch: 'master'
26         - stable-arno:
27             branch: 'stable/arno'
28
29     project: 'functest'
30     somevar: 'foo'
31 ################################
32 # job template
33 ################################
34 - job-template:
35     name: functest-openstack-bench-test
36
37     project-type: freestyle
38
39     node: opnfv-jump-2
40
41     logrotate:
42         daysToKeep: 30
43         numToKeep: 10
44         artifactDaysToKeep: -1
45         artifactNumToKeep: -1
46
47     builders:
48         - shell: |
49             python $HOME/.functest/run_rally.py all
50
51 - job-template:
52     name: functest-openstack-tempest-smoke-test
53
54     project-type: freestyle
55
56     node: opnfv-jump-2
57
58     logrotate:
59         daysToKeep: 30
60         numToKeep: 10
61         artifactDaysToKeep: -1
62         artifactNumToKeep: -1
63
64     builders:
65         - shell: |
66             rally verify start smoke
67             rally verify list
68
69 - job-template:
70     name: functest-odl-test
71
72     project-type: freestyle
73
74     node: opnfv-jump-2
75
76     logrotate:
77         daysToKeep: 30
78         numToKeep: 10
79         artifactDaysToKeep: -1
80         artifactNumToKeep: -1
81
82     builders:
83         - shell: |
84             echo "put your CI scenario here"
85
86 - job-template:
87     name: functest-vims-test
88
89     project-type: freestyle
90
91     node: opnfv-jump-2
92
93     logrotate:
94         daysToKeep: 30
95         numToKeep: 10
96         artifactDaysToKeep: -1
97         artifactNumToKeep: -1
98
99     builders:
100         - shell: |
101             echo "put your CI scenario here"
102
103
104 - job-template:
105     name: functest-vping-test
106
107     project-type: freestyle
108
109     node: opnfv-jump-2
110
111     logrotate:
112         daysToKeep: 30
113         numToKeep: 10
114         artifactDaysToKeep: -1
115         artifactNumToKeep: -1
116
117     builders:
118         - shell: |
119             python $HOME/.functest/vPing/vPing.py
120
121 - job-template:
122     name: functest-{pod}
123
124     project-type: freestyle
125
126     node: '{pod}'
127
128     parameters:
129         - project-parameter:
130             project: '{project}'
131
132     scm:
133         - git-scm:
134             credentials-id: '{ssh-credentials}'
135             refspec: ''
136             branch: master
137
138     logrotate:
139         daysToKeep: 30
140         numToKeep: 10
141         artifactDaysToKeep: -1
142         artifactNumToKeep: -1
143
144     builders:
145         - 'functest-all'
146
147 - job-template:
148     name: 'functest-daily-master'
149
150     node: master
151
152     # Job template for daily builders
153     #
154     # Required Variables:
155     #     stream:    branch with - in place of / (eg. stable)
156     #     branch:    branch (eg. stable)
157
158     project-type: freestyle
159     varsetabove: '{somevar}'
160
161     logrotate:
162         daysToKeep: '{build-days-to-keep}'
163         numToKeep: '{build-num-to-keep}'
164         artifactDaysToKeep: '{build-artifact-days-to-keep}'
165         artifactNumToKeep: '{build-artifact-num-to-keep}'
166
167     parameters:
168         - project-parameter:
169             project: '{project}'
170
171     scm:
172         - git-scm:
173             credentials-id: '{ssh-credentials}'
174             refspec: ''
175             branch: master
176
177     wrappers:
178         - ssh-agent-credentials:
179             user: '{ssh-credentials}'
180
181     triggers:
182         - timed: 'H H * * *'
183
184     prebuilders:
185         - test-macro
186
187     builders:
188         - shell:
189             !include-raw docu-build.sh
190
191     postbuilders:
192         - test-macro
193
194 - job-template:
195     name: 'functest-verify-{stream}'
196
197     node: master
198
199     project-type: freestyle
200
201     logrotate:
202         daysToKeep: 30
203         numToKeep: 10
204         artifactDaysToKeep: -1
205         artifactNumToKeep: -1
206
207     parameters:
208         - project-parameter:
209             project: '{project}'
210         - gerrit-parameter:
211             branch: '{branch}'
212     scm:
213         - gerrit-trigger-scm:
214             credentials-id: '{ssh-credentials}'
215             refspec: '$GERRIT_REFSPEC'
216             choosing-strategy: 'gerrit'
217
218     wrappers:
219         - ssh-agent-credentials:
220             user: '{ssh-credentials}'
221
222     triggers:
223         - gerrit:
224             trigger-on:
225                 - patchset-created-event:
226                     exclude-drafts: 'false'
227                     exclude-trivial-rebase: 'false'
228                     exclude-no-code-change: 'false'
229                 - draft-published-event
230                 - comment-added-contains-event:
231                     comment-contains-value: 'recheck'
232                 - comment-added-contains-event:
233                     comment-contains-value: 'reverify'
234             projects:
235               - project-compare-type: 'ANT'
236                 project-pattern: 'functest'
237                 branches:
238                   - branch-compare-type: 'ANT'
239                     branch-pattern: '**/{branch}'
240
241     builders:
242         - shell:
243             !include-raw docu-build.sh
244
245 - job-template:
246     name: 'functest-merge'
247
248     node: master
249
250     # builder-merge job to run JJB update
251     #
252     # This job's purpose is to update all the JJB
253
254     project-type: freestyle
255
256     logrotate:
257         daysToKeep: 30
258         numToKeep: 40
259         artifactDaysToKeep: -1
260         artifactNumToKeep: 5
261
262     parameters:
263         - project-parameter:
264             project: '{project}'
265         - gerrit-parameter:
266             branch: 'master'
267
268     scm:
269         - gerrit-trigger-scm:
270             credentials-id: '{ssh-credentials}'
271             refspec: ''
272             choosing-strategy: 'default'
273
274     wrappers:
275         - ssh-agent-credentials:
276             user: '{ssh-credentials}'
277
278     triggers:
279         - gerrit:
280             trigger-on:
281                 - change-merged-event
282                 - comment-added-contains-event:
283                     comment-contains-value: 'remerge'
284             projects:
285               - project-compare-type: 'ANT'
286                 project-pattern: 'functest'
287                 branches:
288                     - branch-compare-type: 'ANT'
289                       branch-pattern: '**/master'
290
291     builders:
292         - shell:
293             !include-raw docu-build.sh
294
295 # macros
296 - builder:
297     name: functest-all
298     builders:
299         - shell: |
300             #!/bin/bash
301             set +e
302
303             echo "Functest: prepare Functest environment"
304             mkdir -p $HOME/functest/
305             source $HOME/functest/opnfv-openrc.sh
306
307             # WORKSPACE is the root of the functest repo
308             # go into WORKSPACE where the functest repo is cloned
309             cd $WORKSPACE
310
311             # prepare
312             echo "Functest: prepare Functest environment"
313             python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
314
315             # vPing
316             echo "Functest: run vPing"
317             python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/
318
319             # ODL
320             echo "Functest: run ODL suite"
321             $WORKSPACE/testcases/Controllers/ODL/CI/start_tests.sh
322
323             # tempest
324             echo "Functest: run Tempest suite"
325             rally verify start smoke
326             rally verify list
327
328             # rally
329             echo "Functest: run Functest Rally Bench suites"
330             python $WORKSPACE/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug $WORKSPACE/ all
331
332             # collect results
333             echo "Functest: copy results and clean Functest environment"
334             mkdir -p $HOME/functest/results
335
336             # save tempest.conf for further troubleshooting
337             cp $HOME/.rally/tempest/for-deployment-*/tempest.conf $HOME/functest/results
338
339             # cleanup
340             python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean