Merge "Add arm-virtual3 pod into CI pod list"
[releng.git] / jjb / doctor / doctor.yaml
1 ---
2 - project:
3     name: doctor
4
5     project: '{name}'
6     project-name: '{name}'
7     project-pattern: '{project}'
8
9     rtd-build-url: 'https://readthedocs.org/api/v2/webhook/opnfv-doctor/47214/'
10     rtd-token: '13264f62c1a044e39e9aed22a0dc1853d5a0b196'
11
12     stream:
13       - master:
14           branch: '{stream}'
15           gs-pathname: ''
16           disabled: false
17       - gambia: &gambia
18           branch: 'stable/{stream}'
19           gs-pathname: '/{stream}'
20           disabled: false
21       - fraser:
22           branch: 'stable/{stream}'
23           gs-pathname: '/{stream}'
24           disabled: false
25
26     installer:
27       - 'apex'
28       - 'fuel'
29       - 'daisy'
30
31     arch:
32       - 'x86_64'
33       - 'aarch64'
34
35     inspector:
36       - 'sample'
37       - 'congress'
38
39     exclude:
40       - installer: 'apex'
41         arch: 'aarch64'
42       - installer: 'daisy'
43         arch: 'aarch64'
44       # disabling the following tests due to limitation of PoD owners
45       # these would beenabled again once the PoDs are ready
46       - installer: 'fuel'
47         arch: 'x86_64'
48
49     jobs:
50       - 'doctor-verify-{stream}'
51       - 'doctor-verify-fault_management-{installer}-{inspector}-{arch}-{stream}'
52       - 'doctor-verify-maintenance-{installer}-{inspector}-{arch}-{stream}'
53       - 'doctor-verify-all-{installer}-{inspector}-{arch}-{stream}'
54       - '{project-name}-rtd-jobs'
55
56 - job-template:
57     name: 'doctor-verify-{stream}'
58     disabled: '{obj:disabled}'
59     project-type: 'multijob'
60     parameters:
61       - project-parameter:
62           project: '{project}'
63           branch: '{branch}'
64       - 'doctor-slave-parameter'
65     scm:
66       - git-scm-gerrit
67     triggers:
68       - 'doctor-verify':
69           project: '{project}'
70           branch: '{branch}'
71           files: 'doctor_tests/**'
72
73     builders:
74       - shell: |
75          #!/bin/bash
76          # we do nothing here as the main stuff will be done
77          # in phase jobs
78          echo "Triggering phase jobs!"
79       - multijob:
80           name: 'doctor-verify-sample'
81           execution-type: PARALLEL
82           projects:
83             - name: 'doctor-verify-fault_management-apex-sample-x86_64-{stream}'
84               predefined-parameters: |
85                 PROJECT=$PROJECT
86                 GERRIT_BRANCH=$GERRIT_BRANCH
87                 GERRIT_REFSPEC=$GERRIT_REFSPEC
88                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
89                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
90               kill-phase-on: FAILURE
91               git-revision: true
92             - name: 'doctor-verify-fault_management-daisy-sample-x86_64-{stream}'
93               predefined-parameters: |
94                 PROJECT=$PROJECT
95                 GERRIT_BRANCH=$GERRIT_BRANCH
96                 GERRIT_REFSPEC=$GERRIT_REFSPEC
97                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
98                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
99               kill-phase-on: FAILURE
100               git-revision: true
101             - name: 'doctor-verify-maintenance-apex-sample-x86_64-{stream}'
102               predefined-parameters: |
103                 PROJECT=$PROJECT
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               kill-phase-on: FAILURE
109               git-revision: true
110       - multijob:
111           name: 'doctor-verify-congress'
112           execution-type: PARALLEL
113           projects:
114             - name: 'doctor-verify-fault_management-apex-congress-x86_64-{stream}'
115               predefined-parameters: |
116                 PROJECT=$PROJECT
117                 GERRIT_BRANCH=$GERRIT_BRANCH
118                 GERRIT_REFSPEC=$GERRIT_REFSPEC
119                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
120                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
121               kill-phase-on: FAILURE
122               git-revision: true
123       - multijob:
124           name: 'doctor-verify-sample-all'
125           execution-type: PARALLEL
126           # This would be for running all test cases with sample inspector
127       - multijob:
128           name: 'doctor-verify-congress-all'
129           execution-type: PARALLEL
130           # This would be for running all test cases with congress inspector
131
132 - job-template:
133     name: 'doctor-verify-fault_management-{installer}-{inspector}-{arch}-{stream}'
134     disabled: '{obj:disabled}'
135     node: 'doctor-{installer}-{arch}'
136     wrappers:
137       - ssh-agent-wrapper
138       - build-timeout:
139           timeout: 30
140     parameters:
141       - project-parameter:
142           project: '{project}'
143           branch: '{branch}'
144       - '{installer}-defaults'
145       - 'doctor-slave-parameter'
146       - 'doctor-parameter':
147           inspector: '{inspector}'
148           test_case: 'fault_management'
149     scm:
150       - git-scm-gerrit
151     builders:
152       - 'doctor-verify-installer-inspector-builders-macro'
153     publishers:
154       - 'doctor-verify-publishers-macro'
155
156 - job-template:
157     name: 'doctor-verify-maintenance-{installer}-{inspector}-{arch}-{stream}'
158     disabled: '{obj:disabled}'
159     node: 'nokia-pod1'
160     wrappers:
161       - ssh-agent-wrapper
162       - build-timeout:
163           timeout: 40
164     parameters:
165       - project-parameter:
166           project: '{project}'
167           branch: '{branch}'
168       - '{installer}-defaults'
169       - 'doctor-slave-parameter'
170       - 'doctor-parameter':
171           inspector: '{inspector}'
172           test_case: 'maintenance'
173     scm:
174       - git-scm-gerrit
175     builders:
176       - 'doctor-verify-installer-inspector-builders-macro'
177     publishers:
178       - 'doctor-verify-publishers-macro'
179
180 - job-template:
181     name: 'doctor-verify-all-{installer}-{inspector}-{arch}-{stream}'
182     disabled: '{obj:disabled}'
183     node: 'nokia-pod1'
184     wrappers:
185       - ssh-agent-wrapper
186       - build-timeout:
187           timeout: 50
188     parameters:
189       - project-parameter:
190           project: '{project}'
191           branch: '{branch}'
192       - '{installer}-defaults'
193       - 'doctor-slave-parameter'
194       - 'doctor-parameter':
195           inspector: '{inspector}'
196           test_case: 'all'
197     scm:
198       - git-scm-gerrit
199     builders:
200       - 'doctor-verify-installer-inspector-builders-macro'
201     publishers:
202       - 'doctor-verify-publishers-macro'
203
204
205 # -------------------------------
206 # parameter macros
207 # -------------------------------
208 - parameter:
209     name: 'doctor-parameter'
210     parameters:
211       - string:
212           name: INSPECTOR_TYPE
213           default: '{inspector}'
214           description: 'inspector component'
215       - string:
216           name: TEST_CASE
217           default: '{test_case}'
218           description: 'test case: all, fault_management or maintenance'
219
220
221 # -------------------------------
222 # builder macros
223 # -------------------------------
224
225 - builder:
226     name: 'doctor-verify-installer-inspector-builders-macro'
227     builders:
228       # yamllint disable rule:indentation
229       - shell:
230           !include-raw:
231               - ./doctor-env-presetup.sh
232               - ../../utils/fetch_os_creds.sh
233       - shell: |
234           # prepare the env for test
235           source $HOME/opnfv-openrc.sh
236           if [ -f $HOME/os_cacert ]; then
237               export OS_CACERT=$HOME/os_cacert
238           fi
239           source $HOME/opnfv-installer.sh
240
241           # run tox to trigger the test
242           # As Jenkins user, it has no permission to send ICMP package
243           sudo -E tox -e py34
244
245
246 # -------------------------------
247 # publisher macros
248 # -------------------------------
249 - publisher:
250     name: 'doctor-verify-publishers-macro'
251     publishers:
252       - archive:
253           artifacts: 'doctor_tests/*.log'
254       - email-jenkins-admins-on-failure
255       - workspace-cleanup
256
257 #####################################
258 # trigger macros
259 #####################################
260 - trigger:
261     name: 'doctor-verify'
262     triggers:
263       - gerrit:
264           server-name: 'gerrit.opnfv.org'
265           trigger-on:
266             - patchset-created-event:
267                 exclude-drafts: 'false'
268                 exclude-trivial-rebase: 'false'
269                 exclude-no-code-change: 'false'
270             - draft-published-event
271             - comment-added-contains-event:
272                 comment-contains-value: 'recheck'
273             - comment-added-contains-event:
274                 comment-contains-value: 'reverify'
275           projects:
276             - project-compare-type: 'ANT'
277               project-pattern: '{project}'
278               branches:
279                 - branch-compare-type: 'ANT'
280                   branch-pattern: '**/{branch}'
281               file-paths:
282                 - compare-type: ANT
283                   pattern: '{files}'
284           skip-vote:
285             successful: true
286             failed: true
287             unstable: true
288             notbuilt: true