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