Merge "Update table headers in the reporting page"
[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     inspector:
29       - 'sample'
30       - 'congress'
31
32     task:
33       - verify:
34           auto-trigger-name: 'doctor-verify'
35           is-python: false
36       - python-verify:
37           auto-trigger-name: 'doctor-verify'
38           is-python: true
39
40     pod:
41       - armband-baremetal:
42           slave-label: '{pod}'
43       - armband-virtual:
44           slave-label: '{pod}'
45
46     jobs:
47       - 'doctor-verify-{stream}'
48       - 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}'
49       - 'doctor-{task}-{installer}-{inspector}-{stream}'
50
51 - job-template:
52     name: 'doctor-verify-{stream}'
53
54     disabled: '{obj:disabled}'
55
56     parameters:
57       - project-parameter:
58           project: '{project}'
59           branch: '{branch}'
60       - 'opnfv-build-ubuntu-defaults'
61
62     scm:
63       - git-scm-gerrit
64
65     triggers:
66       - gerrit:
67           server-name: 'gerrit.opnfv.org'
68           trigger-on:
69             - patchset-created-event:
70                 exclude-drafts: 'false'
71                 exclude-trivial-rebase: 'false'
72                 exclude-no-code-change: 'false'
73             - draft-published-event
74             - comment-added-contains-event:
75                 comment-contains-value: 'recheck'
76             - comment-added-contains-event:
77                 comment-contains-value: 'reverify'
78           projects:
79             - project-compare-type: 'ANT'
80               project-pattern: '{project}'
81               branches:
82                 - branch-compare-type: 'ANT'
83                   branch-pattern: '**/{branch}'
84               file-paths:
85                 - compare-type: ANT
86                   pattern: 'doctor_tests/**'
87
88     builders:
89       - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
90
91 - job-template:
92     name: 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}'
93
94     node: '{slave-label}'
95
96     disabled: '{obj:disabled}'
97
98     parameters:
99       - project-parameter:
100           project: '{project}'
101           branch: '{branch}'
102       - 'opnfv-build-ubuntu-defaults'
103
104     scm:
105       - git-scm-gerrit
106
107
108     triggers:
109       - '{auto-trigger-name}':
110           project: '{project}'
111           branch: '{branch}'
112           files: 'doctor_tests/**'
113
114     builders:
115       - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
116
117
118 - job-template:
119     name: 'doctor-{task}-{installer}-{inspector}-{stream}'
120
121     node: '{slave-label}'
122
123     parameters:
124       - project-parameter:
125           project: '{project}'
126           branch: '{branch}'
127       - string:
128           name: OS_CREDS
129           default: /home/jenkins/openstack.creds
130           description: 'OpenStack credentials'
131       - '{slave-label}-defaults'
132       - '{installer}-defaults'
133       - string:
134           name: DOCKER_TAG
135           default: '{docker-tag}'
136           description: 'Tag to pull docker image'
137       - string:
138           name: CLEAN_DOCKER_IMAGES
139           default: 'false'
140           description: 'Remove downloaded docker images (opnfv/functest:*)'
141       - string:
142           name: DEPLOY_SCENARIO
143           default: 'os-nosdn-nofeature-ha'
144           description: 'Scenario to deploy and test'
145       # functest-suite-parameter
146       - string:
147           name: FUNCTEST_MODE
148           default: 'testcase'
149       - string:
150           name: FUNCTEST_SUITE_NAME
151           default: 'doctor-notification'
152       - string:
153           name: TESTCASE_OPTIONS
154           default: '-e INSPECTOR_TYPE={inspector} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor'
155           description: 'Addtional parameters specific to test case(s)'
156       # functest-parameter
157       - string:
158           name: GS_PATHNAME
159           default: '{gs-pathname}'
160           description: "Version directory where the opnfv documents will be stored in gs repository"
161       - string:
162           name: FUNCTEST_REPO_DIR
163           default: "/home/opnfv/repos/functest"
164           description: "Directory where the Functest repository is cloned"
165       - string:
166           name: PUSH_RESULTS_TO_DB
167           default: "true"
168           description: "Push the results of all the tests to the resultDB"
169       - string:
170           name: CI_DEBUG
171           default: 'true'
172           description: "Show debug output information"
173
174     scm:
175       - git-scm-gerrit
176
177     triggers:
178       - '{auto-trigger-name}':
179           project: '{project}'
180           branch: '{branch}'
181           files: 'doctor_tests/**'
182
183     builders:
184       - 'clean-workspace-log'
185       - shell: |
186           # NOTE: Create symbolic link, so that we can archive file outside
187           #       of $WORKSPACE .
188           # NOTE: We are printing all logs under 'tests/' during test run,
189           #       so this symbolic link should not be in 'tests/'. Otherwise,
190           #       we'll have the same log twice in jenkins console log.
191           ln -sfn $HOME/opnfv/functest/results/{stream} functest_results
192           # NOTE: Get functest script in $WORKSPACE. This functest script is
193           #       needed to perform VM image download in set-functest-env.sh
194           #       from E release cycle.
195           mkdir -p functest/ci
196           wget https://git.opnfv.org/functest/plain/functest/ci/download_images.sh -O functest/ci/download_images.sh
197       - 'functest-suite-builder'
198       - shell: |
199           functest_log="$HOME/opnfv/functest/results/{stream}/$FUNCTEST_SUITE_NAME.log"
200           # NOTE: checking the test result, as the previous job could return
201           #       0 regardless the result of doctor test scenario.
202           grep -e 'doctor test successfully' $functest_log || exit 1
203
204     publishers:
205       - archive:
206           artifacts: 'doctor_tests/*.log'
207       - archive:
208           artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log'
209       - email-jenkins-admins-on-failure
210
211
212 #####################################
213 # trigger macros
214 #####################################
215 - trigger:
216     name: 'doctor-verify'
217     triggers:
218       - gerrit:
219           server-name: 'gerrit.opnfv.org'
220           trigger-on:
221             - patchset-created-event:
222                 exclude-drafts: 'false'
223                 exclude-trivial-rebase: 'false'
224                 exclude-no-code-change: 'false'
225             - draft-published-event
226             - comment-added-contains-event:
227                 comment-contains-value: 'recheck'
228             - comment-added-contains-event:
229                 comment-contains-value: 'reverify'
230           projects:
231             - project-compare-type: 'ANT'
232               project-pattern: '{project}'
233               branches:
234                 - branch-compare-type: 'ANT'
235                   branch-pattern: '**/{branch}'
236               file-paths:
237                 - compare-type: ANT
238                   pattern: '{files}'
239           skip-vote:
240             successful: true
241             failed: true
242             unstable: true
243             notbuilt: true