[doctor] disable un-runnable jobs
[releng.git] / jjb / doctor / doctor.yaml
1 ---
2 - project:
3     name: doctor
4
5     project: '{name}'
6
7     stream:
8       - master:
9           branch: '{stream}'
10           gs-pathname: ''
11           docker-tag: 'latest'
12           disabled: false
13       - fraser: &fraser
14           branch: 'stable/{stream}'
15           gs-pathname: '/{stream}'
16           docker-tag: 'stable'
17           disabled: false
18
19     # feature projects' tests are not triggered by functest
20     # doctor verify Pods need to deploy with these scenario
21     installer:
22       - 'apex':
23           scenario: 'os-nosdn-kvm-ha'
24       - 'fuel':
25           scenario: 'os-nosdn-ovs-ha'
26       - 'daisy':
27           scenario: 'os-nosdn-ovs_dpdk-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       - installer: 'daisy'
41         arch: 'aarch64'
42       # disabling the following tests due to limitation of PoD owners
43       # these would beenabled again once the PoDs are ready
44       - installer: 'fuel'
45         arch: 'x86_64'
46       - installer: 'daisy'
47         arch: 'x86_64'
48
49     jobs:
50       - 'doctor-verify-{inspector}-{stream}'
51       - 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
52
53 - job-template:
54     name: 'doctor-verify-{inspector}-{stream}'
55     disabled: '{obj:disabled}'
56     project-type: 'multijob'
57     parameters:
58       - project-parameter:
59           project: '{project}'
60           branch: '{branch}'
61       - 'doctor-slave-parameter'
62     scm:
63       - git-scm-gerrit
64     triggers:
65       - 'doctor-verify':
66           project: '{project}'
67           branch: '{branch}'
68           files: 'doctor_tests/**'
69
70     builders:
71       - shell: |
72          #!/bin/bash
73          # we do nothing here as the main stuff will be done
74          # in phase jobs
75          echo "Triggering phase jobs!"
76       - multijob:
77           name: 'doctor-verify'
78           execution-type: PARALLEL
79           projects:
80             - name: 'doctor-verify-apex-{inspector}-x86_64-{stream}'
81               predefined-parameters: |
82                 PROJECT=$PROJECT
83                 GERRIT_BRANCH=$GERRIT_BRANCH
84                 GERRIT_REFSPEC=$GERRIT_REFSPEC
85                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
86                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
87               kill-phase-on: FAILURE
88               git-revision: true
89             - name: 'doctor-verify-fuel-{inspector}-x86_64-{stream}'
90               predefined-parameters: |
91                 PROJECT=$PROJECT
92                 GERRIT_BRANCH=$GERRIT_BRANCH
93                 GERRIT_REFSPEC=$GERRIT_REFSPEC
94                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
95                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
96               kill-phase-on: FAILURE
97               git-revision: true
98             - name: 'doctor-verify-fuel-{inspector}-aarch64-{stream}'
99               predefined-parameters: |
100                 GERRIT_BRANCH=$GERRIT_BRANCH
101                 GERRIT_REFSPEC=$GERRIT_REFSPEC
102                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
103                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
104               kill-phase-on: FAILURE
105               git-revision: true
106             - name: 'doctor-verify-daisy-{inspector}-x86_64-{stream}'
107               predefined-parameters: |
108                 PROJECT=$PROJECT
109                 GERRIT_BRANCH=$GERRIT_BRANCH
110                 GERRIT_REFSPEC=$GERRIT_REFSPEC
111                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
112                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
113               kill-phase-on: FAILURE
114               git-revision: true
115
116 - job-template:
117     name: 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
118     disabled: '{obj:disabled}'
119     node: 'doctor-{installer}-{arch}'
120     wrappers:
121       - ssh-agent-wrapper
122       - build-timeout:
123           timeout: 30
124     parameters:
125       - project-parameter:
126           project: '{project}'
127           branch: '{branch}'
128       - '{installer}-defaults'
129       - 'doctor-slave-parameter'
130       - 'doctor-parameter':
131           docker-tag: '{docker-tag}'
132           scenario: '{scenario}'
133       - 'doctor-functest-parameter':
134           gs-pathname: '{gs-pathname}'
135           inspector: '{inspector}'
136     scm:
137       - git-scm-gerrit
138     builders:
139       - 'doctor-verify-installer-inspector-builders-macro'
140     publishers:
141       - 'doctor-verify-publishers-macro'
142
143
144 # -------------------------------
145 # parameter macros
146 # -------------------------------
147 - parameter:
148     name: 'doctor-parameter'
149     parameters:
150       - string:
151           name: OS_CREDS
152           default: /home/jenkins/openstack.creds
153           description: 'OpenStack credentials'
154       - string:
155           name: DOCKER_TAG
156           default: '{docker-tag}'
157           description: 'Tag to pull docker image'
158       - string:
159           name: CLEAN_DOCKER_IMAGES
160           default: 'false'
161           description: 'Remove downloaded docker images (opnfv/functest:*)'
162       - string:
163           name: DEPLOY_SCENARIO
164           default: '{scenario}'
165           description: 'Scenario to deploy and test'
166
167 - parameter:
168     name: 'doctor-functest-parameter'
169     parameters:
170       # functest-suite-parameter
171       - string:
172           name: FUNCTEST_MODE
173           default: 'testcase'
174       - string:
175           name: FUNCTEST_SUITE_NAME
176           default: 'doctor-notification'
177       - string:
178           name: TESTCASE_OPTIONS
179           # yamllint disable rule:line-length
180           default: '-e INSPECTOR_TYPE={inspector} -v $WORKSPACE:/home/opnfv/repos/doctor'
181           # yamllint enable rule:line-length
182           description: 'Addtional parameters specific to test case(s)'
183       # functest-parameter
184       - string:
185           name: GS_PATHNAME
186           default: '{gs-pathname}'
187           # yamllint disable rule:line-length
188           description: "Version directory where the opnfv documents will be stored in gs repository"
189           # yamllint enable rule:line-length
190       - string:
191           name: FUNCTEST_REPO_DIR
192           default: "/home/opnfv/repos/functest"
193           description: "Directory where the Functest repository is cloned"
194       - string:
195           name: PUSH_RESULTS_TO_DB
196           default: "true"
197           description: "Push the results of all the tests to the resultDB"
198       - string:
199           name: CI_DEBUG
200           default: 'true'
201           description: "Show debug output information"
202 # -------------------------------
203 # builder macros
204 # -------------------------------
205
206 - builder:
207     name: 'doctor-verify-installer-inspector-builders-macro'
208     builders:
209       - 'clean-workspace-log'
210       # yamllint disable rule:line-length
211       - shell: |
212           # NOTE: Create symbolic link, so that we can archive file outside
213           #       of $WORKSPACE .
214           # NOTE: We are printing all logs under 'tests/' during test run,
215           #       so this symbolic link should not be in 'tests/'. Otherwise,
216           #       we'll have the same log twice in jenkins console log.
217           ln -sfn $HOME/opnfv/functest/results/{stream} functest_results
218           # NOTE: Get functest script in $WORKSPACE. This functest script is
219           #       needed to perform VM image download in set-functest-env.sh
220           #       from E release cycle.
221           mkdir -p functest/ci
222           wget https://git.opnfv.org/functest/plain/functest/ci/download_images.sh -O functest/ci/download_images.sh
223       - 'functest-suite-builder'
224       - shell: |
225           functest_log="$HOME/opnfv/functest/results/{stream}/$FUNCTEST_SUITE_NAME.log"
226           # NOTE: checking the test result, as the previous job could return
227           #       0 regardless the result of doctor test scenario.
228           grep -e 'doctor test successfully' $functest_log || exit 1
229       # yamllint enable rule:line-length
230
231 # -------------------------------
232 # publisher macros
233 # -------------------------------
234 - publisher:
235     name: 'doctor-verify-publishers-macro'
236     publishers:
237       - archive:
238           artifacts: 'doctor_tests/*.log'
239       - archive:
240           artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log'
241       - email-jenkins-admins-on-failure
242
243
244 #####################################
245 # trigger macros
246 #####################################
247 - trigger:
248     name: 'doctor-verify'
249     triggers:
250       - gerrit:
251           server-name: 'gerrit.opnfv.org'
252           trigger-on:
253             - patchset-created-event:
254                 exclude-drafts: 'false'
255                 exclude-trivial-rebase: 'false'
256                 exclude-no-code-change: 'false'
257             - draft-published-event
258             - comment-added-contains-event:
259                 comment-contains-value: 'recheck'
260             - comment-added-contains-event:
261                 comment-contains-value: 'reverify'
262           projects:
263             - project-compare-type: 'ANT'
264               project-pattern: '{project}'
265               branches:
266                 - branch-compare-type: 'ANT'
267                   branch-pattern: '**/{branch}'
268               file-paths:
269                 - compare-type: ANT
270                   pattern: '{files}'
271           skip-vote:
272             successful: true
273             failed: true
274             unstable: true
275             notbuilt: true