[Functest] Add push-logs to functest-suite job
[releng.git] / jjb / releng / testapi-automate.yml
1 - project:
2     name: testapi-automate
3     stream:
4         - master:
5             branch: '{stream}'
6             gs-pathname: ''
7
8     phase:
9         - 'docker-update'
10         - 'docker-deploy':
11             slave-label: 'testresults'
12         - 'generate-doc'
13
14     jobs:
15         - 'testapi-automate-{stream}'
16         - 'testapi-automate-{phase}-{stream}'
17         - 'testapi-verify-{stream}'
18
19     project: 'releng'
20
21 - job:
22     name: 'testapi-mongodb-backup'
23
24     slave-label: 'testresults'
25
26     parameters:
27         - project-parameter:
28             project: '{project}'
29             branch: '{branch}'
30
31     scm:
32         - git-scm
33
34     triggers:
35         - timed: '@weekly'
36
37     builders:
38         - mongodb-backup
39
40 - job-template:
41     name: 'testapi-verify-{stream}'
42
43     parameters:
44         - project-parameter:
45             project: '{project}'
46             branch: '{branch}'
47         - 'opnfv-build-ubuntu-defaults'
48
49     scm:
50         - git-scm-gerrit
51
52     triggers:
53         - gerrit:
54             server-name: 'gerrit.opnfv.org'
55             trigger-on:
56                 - patchset-created-event:
57                     exclude-drafts: 'false'
58                     exclude-trivial-rebase: 'false'
59                     exclude-no-code-change: 'false'
60                 - draft-published-event
61                 - comment-added-contains-event:
62                     comment-contains-value: 'recheck'
63                 - comment-added-contains-event:
64                     comment-contains-value: 'reverify'
65             projects:
66               - project-compare-type: 'ANT'
67                 project-pattern: '{project}'
68                 branches:
69                   - branch-compare-type: 'ANT'
70                     branch-pattern: '**/{branch}'
71                 file-paths:
72                   - compare-type: 'ANT'
73                     pattern: 'utils/test/testapi/**'
74
75     builders:
76         - run-unit-tests
77
78     publishers:
79         - junit:
80             results: nosetests.xml
81         - cobertura:
82             report-file: "coverage.xml"
83             only-stable: "true"
84             health-auto-update: "false"
85             stability-auto-update: "false"
86             zoom-coverage-chart: "true"
87             targets:
88                 - files:
89                     healthy: 10
90                     unhealthy: 20
91                     failing: 30
92                 - method:
93                     healthy: 50
94                     unhealthy: 40
95                     failing: 30
96         - 'email-publisher'
97
98 - job-template:
99     name: 'testapi-automate-{stream}'
100
101     project-type: multijob
102
103     properties:
104         - throttle:
105             enabled: true
106             max-total: 1
107             max-per-node: 1
108             option: 'project'
109
110     parameters:
111         - project-parameter:
112             project: '{project}'
113             branch: '{branch}'
114         - string:
115             name: DOCKER_TAG
116             default: "latest"
117             description: "Tag name for testapi docker image"
118         - 'opnfv-build-defaults'
119
120     scm:
121         - git-scm
122
123     wrappers:
124         - ssh-agent-wrapper
125         - timeout:
126             timeout: 360
127             fail: true
128
129     triggers:
130         - gerrit:
131             server-name: 'gerrit.opnfv.org'
132             trigger-on:
133                 - change-merged-event
134                 - comment-added-contains-event:
135                     comment-contains-value: 'remerge'
136             projects:
137               - project-compare-type: 'ANT'
138                 project-pattern: '{project}'
139                 branches:
140                   - branch-compare-type: 'ANT'
141                     branch-pattern: '**/{branch}'
142                 file-paths:
143                   - compare-type: 'ANT'
144                     pattern: 'utils/test/testapi/**'
145
146     builders:
147         - description-setter:
148             description: "Built on $NODE_NAME"
149         - multijob:
150             name: docker-update
151             condition: SUCCESSFUL
152             projects:
153                 - name: 'testapi-automate-docker-update-{stream}'
154                   current-parameters: true
155                   kill-phase-on: FAILURE
156                   abort-all-job: true
157         - multijob:
158             name: docker-deploy
159             condition: SUCCESSFUL
160             projects:
161                 - name: 'testapi-automate-docker-deploy-{stream}'
162                   current-parameters: false
163                   node-label-name: SLAVE_LABEL
164                   node-label: testresults
165                   kill-phase-on: FAILURE
166                   abort-all-job: true
167         - multijob:
168             name: generate-doc
169             condition: SUCCESSFUL
170             projects:
171                 - name: 'testapi-automate-generate-doc-{stream}'
172                   current-parameters: true
173                   kill-phase-on: FAILURE
174                   abort-all-job: true
175
176     publishers:
177         - 'email-publisher'
178
179 - job-template:
180     name: 'testapi-automate-{phase}-{stream}'
181
182     properties:
183         - throttle:
184             enabled: true
185             max-per-node: 1
186             option: 'project'
187
188     parameters:
189         - project-parameter:
190             project: '{project}'
191             branch: '{branch}'
192         - string:
193             name: DOCKER_TAG
194             default: "latest"
195             description: "Tag name for testapi docker image"
196
197     wrappers:
198         - ssh-agent-wrapper
199         - timeout:
200             timeout: 120
201             fail: true
202
203     scm:
204         - git-scm
205
206     builders:
207         - description-setter:
208             description: "Built on $NODE_NAME"
209         - 'testapi-automate-{phase}-macro'
210
211 ################################
212 # job builders
213 ################################
214 - builder:
215     name: mongodb-backup
216     builders:
217         - shell: |
218             bash ./jjb/releng/testapi-backup-mongodb.sh
219
220 - builder:
221     name: 'run-unit-tests'
222     builders:
223         - shell: |
224             bash ./utils/test/testapi/run_test.sh
225
226 - builder:
227     name: 'testapi-automate-docker-update-macro'
228     builders:
229         - shell: |
230             bash ./jjb/releng/testapi-docker-update.sh
231
232 - builder:
233     name: 'testapi-automate-generate-doc-macro'
234     builders:
235         - 'testapi-doc-build'
236         - 'upload-doc-artifact'
237
238 - builder:
239     name: 'testapi-doc-build'
240     builders:
241         - shell: |
242             bash ./utils/test/testapi/htmlize/doc-build.sh
243
244 - builder:
245     name: 'upload-doc-artifact'
246     builders:
247         - shell: |
248             bash ./utils/test/testapi/htmlize/push-doc-artifact.sh
249
250 - builder:
251     name: 'testapi-automate-docker-deploy-macro'
252     builders:
253         - shell: |
254             bash ./jjb/releng/testapi-docker-deploy.sh
255
256 ################################
257 # job publishers
258 ################################
259
260 - publisher:
261     name: 'email-publisher'
262     publishers:
263         - email:
264             recipients: rohitsakala@gmail.com serena.feng.711@gmail.com
265             notify-every-unstable-build: false
266             send-to-individuals: true