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