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