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