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