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