Merge "dovetail: bugfix of parameter name"
[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                   predefined-parameters: |
164                     GIT_BASE=$GIT_BASE
165                   node-label-name: SLAVE_LABEL
166                   node-label: testresults
167                   kill-phase-on: FAILURE
168                   abort-all-job: true
169         - multijob:
170             name: generate-doc
171             condition: SUCCESSFUL
172             projects:
173                 - name: 'testapi-automate-generate-doc-{stream}'
174                   current-parameters: true
175                   kill-phase-on: FAILURE
176                   abort-all-job: true
177
178     publishers:
179         - 'email-publisher'
180
181 - job-template:
182     name: 'testapi-automate-{phase}-{stream}'
183
184     properties:
185         - throttle:
186             enabled: true
187             max-per-node: 1
188             option: 'project'
189
190     parameters:
191         - project-parameter:
192             project: '{project}'
193             branch: '{branch}'
194         - string:
195             name: DOCKER_TAG
196             default: "latest"
197             description: "Tag name for testapi docker image"
198
199     wrappers:
200         - ssh-agent-wrapper
201         - timeout:
202             timeout: 120
203             fail: true
204
205     scm:
206         - git-scm
207
208     builders:
209         - description-setter:
210             description: "Built on $NODE_NAME"
211         - 'testapi-automate-{phase}-macro'
212
213 ################################
214 # job builders
215 ################################
216 - builder:
217     name: mongodb-backup
218     builders:
219         - shell: |
220             bash ./jjb/releng/testapi-backup-mongodb.sh
221
222 - builder:
223     name: 'run-unit-tests'
224     builders:
225         - shell: |
226             bash ./utils/test/testapi/run_test.sh
227
228 - builder:
229     name: 'testapi-automate-docker-update-macro'
230     builders:
231         - shell: |
232             bash ./jjb/releng/testapi-docker-update.sh
233
234 - builder:
235     name: 'testapi-automate-generate-doc-macro'
236     builders:
237         - 'testapi-doc-build'
238         - 'upload-doc-artifact'
239
240 - builder:
241     name: 'testapi-doc-build'
242     builders:
243         - shell: |
244             bash ./utils/test/testapi/htmlize/doc-build.sh
245
246 - builder:
247     name: 'upload-doc-artifact'
248     builders:
249         - shell: |
250             bash ./utils/test/testapi/htmlize/push-doc-artifact.sh
251
252 - builder:
253     name: 'testapi-automate-docker-deploy-macro'
254     builders:
255         - shell: |
256             bash ./jjb/releng/testapi-docker-deploy.sh
257
258 ################################
259 # job publishers
260 ################################
261
262 - publisher:
263     name: 'email-publisher'
264     publishers:
265         - email:
266             recipients: rohitsakala@gmail.com feng.xiaowei@zte.com.cn
267             notify-every-unstable-build: false
268             send-to-individuals: true