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