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