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