add daisy installer for doctor verify 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       - 'fuel'
22       - 'daisy'
23
24     arch:
25       - 'x86_64'
26       - 'aarch64'
27
28     inspector:
29       - 'sample'
30       - 'congress'
31
32     exclude:
33       - installer: 'apex'
34         arch: 'aarch64'
35       - installer: 'daisy'
36         arch: 'aarch64'
37
38     jobs:
39       - 'doctor-verify-{stream}'
40       - 'doctor-verify-unit-test-{stream}'
41       - 'doctor-verify-{inspector}-{stream}'
42       - 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
43
44 - job-template:
45     name: 'doctor-verify-{stream}'
46     disabled: '{obj:disabled}'
47     project-type: 'multijob'
48     parameters:
49       - project-parameter:
50           project: '{project}'
51           branch: '{branch}'
52       - 'opnfv-build-ubuntu-defaults'
53     scm:
54       - git-scm-gerrit
55     triggers:
56       - gerrit:
57           server-name: 'gerrit.opnfv.org'
58           trigger-on:
59             - patchset-created-event:
60                 exclude-drafts: 'false'
61                 exclude-trivial-rebase: 'false'
62                 exclude-no-code-change: 'false'
63             - draft-published-event
64             - comment-added-contains-event:
65                 comment-contains-value: 'recheck'
66             - comment-added-contains-event:
67                 comment-contains-value: 'reverify'
68           projects:
69             - project-compare-type: 'ANT'
70               project-pattern: '{project}'
71               branches:
72                 - branch-compare-type: 'ANT'
73                   branch-pattern: '**/{branch}'
74               file-paths:
75                 - compare-type: ANT
76                   pattern: 'doctor_tests/**'
77
78     builders:
79       - shell: |
80          #!/bin/bash
81          # we do nothing here as the main stuff will be done
82          # in phase jobs
83          echo "Triggering phase jobs!"
84       - multijob:
85           name: 'doctor-build-and-unittest'
86           execution-type: PARALLEL
87           projects:
88             - name: 'doctor-verify-unit-test-{stream}'
89               predefined-parameters: |
90                 PROJECT=$PROJECT
91                 GERRIT_BRANCH=$GERRIT_BRANCH
92                 GERRIT_REFSPEC=$GERRIT_REFSPEC
93                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
94                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
95               kill-phase-on: FAILURE
96               current-parameters: true
97               git-revision: true
98
99 - job-template:
100     name: 'doctor-verify-unit-test-{stream}'
101     disabled: '{obj:disabled}'
102     wrappers:
103       - ssh-agent-wrapper
104       - build-timeout:
105           timeout: 60
106     parameters:
107       - project-parameter:
108           project: '{project}'
109           branch: '{branch}'
110       - 'opnfv-build-ubuntu-defaults'
111     scm:
112       - git-scm-gerrit
113     builders:
114       - 'doctor-verify-unit-test-builders-macro'
115     publishers:
116       - 'doctor-verify-unit-test-publishers-macro'
117
118 - job-template:
119     name: 'doctor-verify-{inspector}-{stream}'
120     disabled: '{obj:disabled}'
121     project-type: 'multijob'
122     scm:
123       - git-scm-gerrit
124     triggers:
125       - 'doctor-verify':
126           project: '{project}'
127           branch: '{branch}'
128           files: 'doctor_tests/**'
129
130     builders:
131       - shell: |
132          #!/bin/bash
133          # we do nothing here as the main stuff will be done
134          # in phase jobs
135          echo "Triggering phase jobs!"
136       - multijob:
137           name: 'doctor-verify-apex-inspector'
138           execution-type: PARALLEL
139           projects:
140             - name: 'doctor-verify-apex-{inspector}-x86_64-{stream}'
141               predefined-parameters: |
142                 PROJECT=$PROJECT
143                 GERRIT_BRANCH=$GERRIT_BRANCH
144                 GERRIT_REFSPEC=$GERRIT_REFSPEC
145                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
146                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
147               kill-phase-on: FAILURE
148               current-parameters: true
149               git-revision: true
150       - multijob:
151           name: 'doctor-verify-fuel-inspector'
152           execution-type: PARALLEL
153           projects:
154             - name: 'doctor-verify-fuel-{inspector}-x86_64-{stream}'
155               predefined-parameters: |
156                 PROJECT=$PROJECT
157                 GERRIT_BRANCH=$GERRIT_BRANCH
158                 GERRIT_REFSPEC=$GERRIT_REFSPEC
159                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
160                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
161               kill-phase-on: FAILURE
162               current-parameters: true
163               git-revision: true
164       - multijob:
165           name: 'doctor-verify-fuel-inspector'
166           execution-type: PARALLEL
167           projects:
168             - name: 'doctor-verify-fuel-{inspector}-aarch64-{stream}'
169               predefined-parameters: |
170                 GERRIT_BRANCH=$GERRIT_BRANCH
171                 GERRIT_REFSPEC=$GERRIT_REFSPEC
172                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
173                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
174               kill-phase-on: FAILURE
175               current-parameters: true
176               git-revision: true
177       - multijob:
178           name: 'doctor-verify-daisy-inspector'
179           execution-type: PARALLEL
180           projects:
181             - name: 'doctor-verify-daisy-{inspector}-x86_64-{stream}'
182               predefined-parameters: |
183                 PROJECT=$PROJECT
184                 GERRIT_BRANCH=$GERRIT_BRANCH
185                 GERRIT_REFSPEC=$GERRIT_REFSPEC
186                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
187                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
188               kill-phase-on: FAILURE
189               current-parameters: true
190               git-revision: true
191
192 - job-template:
193     name: 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
194     disabled: '{obj:disabled}'
195     node: 'doctor-{installer}-{arch}'
196     wrappers:
197       - ssh-agent-wrapper
198       - build-timeout:
199           timeout: 30
200     parameters:
201       - project-parameter:
202           project: '{project}'
203           branch: '{branch}'
204       - '{installer}-defaults'
205       - 'doctor-slave-parameter'
206       - 'doctor-parameter'
207       - 'doctor-functest-parameter'
208     scm:
209       - git-scm-gerrit
210     builders:
211       - 'doctor-verify-installer-inspector-builders-macro'
212     publishers:
213       - 'doctor-verify-publishers-macro'
214
215
216 # -------------------------------
217 # parameter macros
218 # -------------------------------
219 - parameter:
220     name: 'doctor-parameter'
221     parameters:
222       - string:
223           name: OS_CREDS
224           default: /home/jenkins/openstack.creds
225           description: 'OpenStack credentials'
226       - string:
227           name: DOCKER_TAG
228           default: '{docker-tag}'
229           description: 'Tag to pull docker image'
230       - string:
231           name: CLEAN_DOCKER_IMAGES
232           default: 'false'
233           description: 'Remove downloaded docker images (opnfv/functest:*)'
234       - string:
235           name: DEPLOY_SCENARIO
236           default: 'os-nosdn-nofeature-ha'
237           description: 'Scenario to deploy and test'
238
239 - parameter:
240     name: 'doctor-functest-parameter'
241     parameters:
242       # functest-suite-parameter
243       - string:
244           name: FUNCTEST_MODE
245           default: 'testcase'
246       - string:
247           name: FUNCTEST_SUITE_NAME
248           default: 'doctor-notification'
249       - string:
250           name: TESTCASE_OPTIONS
251           # yamllint disable rule:line-length
252           default: '-e INSPECTOR_TYPE={inspector} -v $WORKSPACE:/home/opnfv/repos/doctor'
253           # yamllint enable rule:line-length
254           description: 'Addtional parameters specific to test case(s)'
255       # functest-parameter
256       - string:
257           name: GS_PATHNAME
258           default: '{gs-pathname}'
259           # yamllint disable rule:line-length
260           description: "Version directory where the opnfv documents will be stored in gs repository"
261           # yamllint enable rule:line-length
262       - string:
263           name: FUNCTEST_REPO_DIR
264           default: "/home/opnfv/repos/functest"
265           description: "Directory where the Functest repository is cloned"
266       - string:
267           name: PUSH_RESULTS_TO_DB
268           default: "true"
269           description: "Push the results of all the tests to the resultDB"
270       - string:
271           name: CI_DEBUG
272           default: 'true'
273           description: "Show debug output information"
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