The '{is-skip-vote}' is always 'true' for the jobs
[releng.git] / jjb / doctor / doctor.yml
1 ---
2 - project:
3     name: doctor
4
5     project: '{name}'
6
7     stream:
8       - master:
9           branch: '{stream}'
10           gs-pathname: ''
11           docker-tag: 'latest'
12           disabled: false
13       - euphrates:
14           branch: 'stable/{stream}'
15           gs-pathname: '/{stream}'
16           docker-tag: 'stable'
17           disabled: false
18
19     installer:
20       - apex:
21           slave-label: 'doctor-apex-verify'
22       - fuel:
23           slave-label: 'doctor-fuel-verify'
24     # - joid:
25     #     slave-label: 'ool-virtual3'
26     #     pod: 'ool-virtual3'
27
28     phase:
29       - 'build-x86_64':
30           slave-label: 'doctor-{installer}-verify'
31       - 'build-aarch64':
32           slave-label: 'doctor-{installer}-{phase}-verify'
33
34     inspector:
35       - 'sample'
36       - 'congress'
37
38     task:
39       - verify:
40           auto-trigger-name: 'doctor-verify'
41
42     exclude:
43       - installer: 'apex'
44         phase: 'build-aarch64'
45
46     jobs:
47       - 'doctor-verify-{stream}'
48       - 'doctor-verify-unit-test-{stream}'
49       - 'doctor-{task}-{inspector}-{stream}'
50       - 'doctor-{task}-{installer}-{inspector}-{phase}-{stream}'
51
52 - job-template:
53     name: 'doctor-verify-{stream}'
54
55     disabled: '{obj:disabled}'
56
57     project-type: 'multijob'
58
59     parameters:
60       - project-parameter:
61           project: '{project}'
62           branch: '{branch}'
63       - 'opnfv-build-ubuntu-defaults'
64
65     scm:
66       - git-scm-gerrit
67
68     triggers:
69       - gerrit:
70           server-name: 'gerrit.opnfv.org'
71           trigger-on:
72             - patchset-created-event:
73                 exclude-drafts: 'false'
74                 exclude-trivial-rebase: 'false'
75                 exclude-no-code-change: 'false'
76             - draft-published-event
77             - comment-added-contains-event:
78                 comment-contains-value: 'recheck'
79             - comment-added-contains-event:
80                 comment-contains-value: 'reverify'
81           projects:
82             - project-compare-type: 'ANT'
83               project-pattern: '{project}'
84               branches:
85                 - branch-compare-type: 'ANT'
86                   branch-pattern: '**/{branch}'
87               file-paths:
88                 - compare-type: ANT
89                   pattern: 'doctor_tests/**'
90
91     builders:
92       - shell: |
93          #!/bin/bash
94          # we do nothing here as the main stuff will be done
95          # in phase jobs
96          echo "Triggering phase jobs!"
97       - multijob:
98           name: 'doctor-build-and-unittest'
99           execution-type: PARALLEL
100           projects:
101             - name: 'doctor-verify-unit-test-{stream}'
102               current-parameters: false
103               predefined-parameters: |
104                 GERRIT_BRANCH=$GERRIT_BRANCH
105                 GERRIT_REFSPEC=$GERRIT_REFSPEC
106                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
107                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
108               git-revision: true
109               node-parameters: false
110               kill-phase-on: FAILURE
111               abort-all-job: false
112
113 - job-template:
114     name: 'doctor-verify-unit-test-{stream}'
115     disabled: '{obj:disabled}'
116     wrappers:
117       - ssh-agent-wrapper
118       - build-timeout:
119           timeout: 60
120     parameters:
121       - project-parameter:
122           project: '{project}'
123           branch: '{branch}'
124       - 'opnfv-build-ubuntu-defaults'
125     scm:
126       - git-scm-gerrit
127     builders:
128       - 'doctor-verify-unit-test-builders-macro'
129     publishers:
130       - 'doctor-verify-unit-test-publishers-macro'
131
132 - job-template:
133     name: 'doctor-{task}-{inspector}-{stream}'
134
135     disabled: '{obj:disabled}'
136
137     project-type: 'multijob'
138
139     parameters:
140       - project-parameter:
141           project: '{project}'
142           branch: '{branch}'
143       - 'opnfv-build-ubuntu-defaults'
144       - string:
145           name: OS_CREDS
146           default: /home/jenkins/openstack.creds
147           description: 'OpenStack credentials'
148       - string:
149           name: DOCKER_TAG
150           default: '{docker-tag}'
151           description: 'Tag to pull docker image'
152       - string:
153           name: CLEAN_DOCKER_IMAGES
154           default: 'false'
155           description: 'Remove downloaded docker images (opnfv/functest:*)'
156       - string:
157           name: DEPLOY_SCENARIO
158           default: 'os-nosdn-nofeature-ha'
159           description: 'Scenario to deploy and test'
160       # functest-suite-parameter
161       - string:
162           name: FUNCTEST_MODE
163           default: 'testcase'
164       - string:
165           name: FUNCTEST_SUITE_NAME
166           default: 'doctor-notification'
167       - string:
168           name: TESTCASE_OPTIONS
169           # yamllint disable rule:line-length
170           default: '-e INSPECTOR_TYPE={inspector} -v $WORKSPACE:/home/opnfv/repos/doctor'
171           # yamllint enable rule:line-length
172           description: 'Addtional parameters specific to test case(s)'
173       # functest-parameter
174       - string:
175           name: GS_PATHNAME
176           default: '{gs-pathname}'
177           # yamllint disable rule:line-length
178           description: "Version directory where the opnfv documents will be stored in gs repository"
179           # yamllint enable rule:line-length
180       - string:
181           name: FUNCTEST_REPO_DIR
182           default: "/home/opnfv/repos/functest"
183           description: "Directory where the Functest repository is cloned"
184       - string:
185           name: PUSH_RESULTS_TO_DB
186           default: "true"
187           description: "Push the results of all the tests to the resultDB"
188       - string:
189           name: CI_DEBUG
190           default: 'true'
191           description: "Show debug output information"
192
193     scm:
194       - git-scm-gerrit
195
196     triggers:
197       - '{auto-trigger-name}':
198           project: '{project}'
199           branch: '{branch}'
200           files: 'doctor_tests/**'
201
202     builders:
203       - shell: |
204          #!/bin/bash
205          # we do nothing here as the main stuff will be done
206          # in phase jobs
207          echo "Triggering phase jobs!"
208       - multijob:
209           name: 'doctor-verify-apex-inspector'
210           execution-type: PARALLEL
211           projects:
212             - name: 'doctor-{task}-apex-{inspector}-build-x86_64-{stream}'
213               current-parameters: false
214               predefined-parameters: |
215                 GERRIT_BRANCH=$GERRIT_BRANCH
216                 GERRIT_REFSPEC=$GERRIT_REFSPEC
217                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
218                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
219               git-revision: true
220               node-parameters: false
221               kill-phase-on: FAILURE
222               abort-all-job: false
223       - multijob:
224           name: 'doctor-verify-fuel-inspector'
225           execution-type: PARALLEL
226           projects:
227             - name: 'doctor-{task}-fuel-{inspector}-build-x86_64-{stream}'
228               current-parameters: false
229               predefined-parameters: |
230                 GERRIT_BRANCH=$GERRIT_BRANCH
231                 GERRIT_REFSPEC=$GERRIT_REFSPEC
232                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
233                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
234               git-revision: true
235               node-parameters: false
236               kill-phase-on: FAILURE
237               abort-all-job: false
238       - multijob:
239           name: 'doctor-verify-fuel-inspector'
240           execution-type: PARALLEL
241           projects:
242             - name: 'doctor-{task}-fuel-{inspector}-build-aarch64-{stream}'
243               current-parameters: false
244               predefined-parameters: |
245                 GERRIT_BRANCH=$GERRIT_BRANCH
246                 GERRIT_REFSPEC=$GERRIT_REFSPEC
247                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
248                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
249               git-revision: true
250               node-parameters: false
251               kill-phase-on: FAILURE
252               abort-all-job: false
253
254 - job-template:
255     name: 'doctor-{task}-{installer}-{inspector}-{phase}-{stream}'
256     disabled: '{obj:disabled}'
257     node: '{slave-label}'
258     wrappers:
259       - ssh-agent-wrapper
260       - build-timeout:
261           timeout: 30
262     parameters:
263       - project-parameter:
264           project: '{project}'
265           branch: '{branch}'
266       - '{installer}-defaults'
267       - '{slave-label}-defaults'
268     scm:
269       - git-scm-gerrit
270     builders:
271       - 'doctor-verify-installer-inspector-builders-macro'
272     publishers:
273       - 'doctor-verify-publishers-macro'
274 # -------------------------------
275 # builder macros
276 # -------------------------------
277
278 - builder:
279     name: 'doctor-verify-unit-test-builders-macro'
280     builders:
281       - shell: "tox -e pep8"
282
283 - builder:
284     name: 'doctor-verify-installer-inspector-builders-macro'
285     builders:
286       - 'clean-workspace-log'
287       # yamllint disable rule:line-length
288       - shell: |
289           # NOTE: Create symbolic link, so that we can archive file outside
290           #       of $WORKSPACE .
291           # NOTE: We are printing all logs under 'tests/' during test run,
292           #       so this symbolic link should not be in 'tests/'. Otherwise,
293           #       we'll have the same log twice in jenkins console log.
294           ln -sfn $HOME/opnfv/functest/results/{stream} functest_results
295           # NOTE: Get functest script in $WORKSPACE. This functest script is
296           #       needed to perform VM image download in set-functest-env.sh
297           #       from E release cycle.
298           mkdir -p functest/ci
299           wget https://git.opnfv.org/functest/plain/functest/ci/download_images.sh -O functest/ci/download_images.sh
300       - 'functest-suite-builder'
301       - shell: |
302           functest_log="$HOME/opnfv/functest/results/{stream}/$FUNCTEST_SUITE_NAME.log"
303           # NOTE: checking the test result, as the previous job could return
304           #       0 regardless the result of doctor test scenario.
305           grep -e 'doctor test successfully' $functest_log || exit 1
306       # yamllint enable rule:line-length
307
308 # -------------------------------
309 # publisher macros
310 # -------------------------------
311 - publisher:
312     name: 'doctor-verify-publishers-macro'
313     publishers:
314       - archive:
315           artifacts: 'doctor_tests/*.log'
316       - archive:
317           artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log'
318       - email-jenkins-admins-on-failure
319
320 - publisher:
321     name: 'doctor-verify-unit-test-publishers-macro'
322     publishers:
323       - email-jenkins-admins-on-failure
324       - archive:
325           artifacts: '.tox/'
326
327
328 #####################################
329 # trigger macros
330 #####################################
331 - trigger:
332     name: 'doctor-verify'
333     triggers:
334       - gerrit:
335           server-name: 'gerrit.opnfv.org'
336           trigger-on:
337             - patchset-created-event:
338                 exclude-drafts: 'false'
339                 exclude-trivial-rebase: 'false'
340                 exclude-no-code-change: 'false'
341             - draft-published-event
342             - comment-added-contains-event:
343                 comment-contains-value: 'recheck'
344             - comment-added-contains-event:
345                 comment-contains-value: 'reverify'
346           projects:
347             - project-compare-type: 'ANT'
348               project-pattern: '{project}'
349               branches:
350                 - branch-compare-type: 'ANT'
351                   branch-pattern: '**/{branch}'
352               file-paths:
353                 - compare-type: ANT
354                   pattern: '{files}'
355           skip-vote:
356             successful: true
357             failed: true
358             unstable: true
359             notbuilt: true