661dffa787e3af8caf11994f2173f4fc4a6bfb31
[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     scm:
122         - git-scm:
123             credentials-id: '{ssh-credentials}'
124             refspec: ''
125             branch: master
126
127     logrotate:
128         daysToKeep: 30
129         numToKeep: 10
130         artifactDaysToKeep: -1
131         artifactNumToKeep: -1
132
133     builders:
134         - 'functest-all'
135
136 - job-template:
137     name: 'functest-daily-{stream}'
138
139     node: master
140
141     # Job template for daily builders
142     #
143     # Required Variables:
144     #     stream:    branch with - in place of / (eg. stable)
145     #     branch:    branch (eg. stable)
146
147     project-type: freestyle
148     varsetabove: '{somevar}'
149
150     logrotate:
151         daysToKeep: '{build-days-to-keep}'
152         numToKeep: '{build-num-to-keep}'
153         artifactDaysToKeep: '{build-artifact-days-to-keep}'
154         artifactNumToKeep: '{build-artifact-num-to-keep}'
155
156     parameters:
157         - project-parameter:
158             project: '{project}'
159
160     scm:
161         - git-scm:
162             credentials-id: '{ssh-credentials}'
163             refspec: ''
164             branch: '{branch}'
165
166     wrappers:
167         - ssh-agent-credentials:
168             user: '{ssh-credentials}'
169
170     triggers:
171         - timed: 'H H * * *'
172
173     prebuilders:
174         - test-macro
175
176     builders:
177         - shell:
178             !include-raw docu-build.sh
179
180     postbuilders:
181         - test-macro
182
183 - job-template:
184     name: 'functest-verify'
185
186     node: master
187
188     project-type: freestyle
189
190     logrotate:
191         daysToKeep: 30
192         numToKeep: 10
193         artifactDaysToKeep: -1
194         artifactNumToKeep: -1
195
196     parameters:
197         - project-parameter:
198             project: '{project}'
199         - gerrit-parameter:
200             branch: 'master'
201     scm:
202         - gerrit-trigger-scm:
203             credentials-id: '{ssh-credentials}'
204             refspec: '$GERRIT_REFSPEC'
205             choosing-strategy: 'gerrit'
206
207     wrappers:
208         - ssh-agent-credentials:
209             user: '{ssh-credentials}'
210
211     triggers:
212         - gerrit:
213             trigger-on:
214                 - patchset-created-event:
215                     exclude-drafts: 'false'
216                     exclude-trivial-rebase: 'false'
217                     exclude-no-code-change: 'false'
218                 - draft-published-event
219                 - comment-added-contains-event:
220                     comment-contains-value: 'recheck'
221                 - comment-added-contains-event:
222                     comment-contains-value: 'reverify'
223             projects:
224               - project-compare-type: 'ANT'
225                 project-pattern: 'functest'
226                 branches:
227                   - branch-compare-type: 'ANT'
228                     branch-pattern: '**/master'
229
230     builders:
231         - shell:
232             !include-raw docu-verify.sh
233
234 - job-template:
235     name: 'functest-merge'
236
237     node: master
238
239     # builder-merge job to run JJB update
240     #
241     # This job's purpose is to update all the JJB
242
243     project-type: freestyle
244
245     logrotate:
246         daysToKeep: 30
247         numToKeep: 40
248         artifactDaysToKeep: -1
249         artifactNumToKeep: 5
250
251     parameters:
252         - project-parameter:
253             project: '{project}'
254         - gerrit-parameter:
255             branch: 'master'
256
257     scm:
258         - gerrit-trigger-scm:
259             credentials-id: '{ssh-credentials}'
260             refspec: ''
261             choosing-strategy: 'default'
262
263     wrappers:
264         - ssh-agent-credentials:
265             user: '{ssh-credentials}'
266
267     triggers:
268         - gerrit:
269             trigger-on:
270                 - change-merged-event
271                 - comment-added-contains-event:
272                     comment-contains-value: 'remerge'
273             projects:
274               - project-compare-type: 'ANT'
275                 project-pattern: 'functest'
276                 branches:
277                     - branch-compare-type: 'ANT'
278                       branch-pattern: '**/master'
279
280     builders:
281         - shell:
282             !include-raw docu-build.sh
283
284 # macros
285 - builder:
286     name: functest-all
287     builders:
288         - shell: |
289             echo "Functest: prepare Functest environment"
290             mkdir -p $HOME/functest/
291             source $HOME/functest/opnfv-openrc.sh
292
293             # WORKSPACE is the root of the functest repo
294             # go into WORKSPACE where the functest repo is cloned
295             cd $WORKSPACE
296
297             # prepare
298             echo "Functest: prepare Functest environment"
299             python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
300
301             # tempest
302             echo "Functest: run Tempest suite"
303             rally verify start smoke
304             rally verify list
305
306             # vPing
307             echo "Functest: run vPing"
308             python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/
309
310             # rally
311             echo "Functest: run Functest Rally Bench suites"
312             python $WORKSPACE/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug $WORKSPACE/ all
313
314             # ODL
315             echo "Functest: run ODL suite"
316             $WORKSPACE/testcases/Controllers/ODL/CI/start_tests.sh
317
318             # collect results
319             echo "Functest: copy results and clean Functest environment"
320             mkdir -p $HOME/functest/results
321
322             # save tempest.conf for further troubleshooting
323             cp $HOME/.rally/for-deployment-*/tempest.conf $HOME/functest/results
324
325             # cleanup
326             python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean