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