add python verify job for doctor
[releng.git] / jjb / doctor / doctor.yml
1 - project:
2     name: doctor
3
4     project: '{name}'
5
6     stream:
7         - master:
8             branch: '{stream}'
9             gs-pathname: ''
10             docker-tag: 'latest'
11             disabled: false
12         - danube:
13             branch: 'stable/{stream}'
14             gs-pathname: '/{stream}'
15             docker-tag: 'stable'
16             disabled: false
17
18     installer:
19         - apex:
20             slave-label: 'ool-virtual1'
21             pod: 'ool-virtual1'
22         - fuel:
23             slave-label: 'ool-virtual2'
24             pod: 'ool-virtual2'
25         #- joid:
26         #    slave-label: 'ool-virtual3'
27         #    pod: 'ool-virtual3'
28
29     inspector:
30         - 'sample'
31         - 'congress'
32
33     task:
34         - verify:
35             profiler: 'none'
36             auto-trigger-name: 'doctor-verify'
37             is-python: false
38         - profiling:
39             profiler: 'poc'
40             auto-trigger-name: 'experimental'
41             is-python: false
42         - python-verify:
43             profiler: 'none'
44             auto-trigger-name: 'doctor-verify'
45             is-python: true
46
47     pod:
48         - arm-pod2:
49             slave-label: '{pod}'
50         - arm-pod3:
51             slave-label: '{pod}'
52
53     jobs:
54         - 'doctor-verify-{stream}'
55         - 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}'
56         - 'doctor-{task}-{installer}-{inspector}-{stream}'
57
58 - job-template:
59     name: 'doctor-verify-{stream}'
60
61     disabled: '{obj:disabled}'
62
63     parameters:
64         - project-parameter:
65             project: '{project}'
66             branch: '{branch}'
67         - 'opnfv-build-ubuntu-defaults'
68
69     scm:
70         - git-scm-gerrit
71
72     triggers:
73         - gerrit:
74             server-name: 'gerrit.opnfv.org'
75             trigger-on:
76                 - patchset-created-event:
77                     exclude-drafts: 'false'
78                     exclude-trivial-rebase: 'false'
79                     exclude-no-code-change: 'false'
80                 - draft-published-event
81                 - comment-added-contains-event:
82                     comment-contains-value: 'recheck'
83                 - comment-added-contains-event:
84                     comment-contains-value: 'reverify'
85             projects:
86               - project-compare-type: 'ANT'
87                 project-pattern: '{project}'
88                 branches:
89                   - branch-compare-type: 'ANT'
90                     branch-pattern: '**/{branch}'
91                 file-paths:
92                   - compare-type: ANT
93                     pattern: 'tests/**'
94
95     builders:
96         - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
97
98 - job-template:
99     name: 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}'
100
101     node: '{slave-label}'
102
103     disabled: '{obj:disabled}'
104
105     parameters:
106         - project-parameter:
107             project: '{project}'
108             branch: '{branch}'
109         - 'opnfv-build-ubuntu-defaults'
110
111     scm:
112         - git-scm-gerrit
113
114
115     triggers:
116         - '{auto-trigger-name}':
117             project: '{project}'
118             branch: '{branch}'
119
120     builders:
121         - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
122
123
124 - job-template:
125     name: 'doctor-{task}-{installer}-{inspector}-{stream}'
126
127     node: '{slave-label}'
128
129     parameters:
130         - project-parameter:
131             project: '{project}'
132             branch: '{branch}'
133         - string:
134             name: OS_CREDS
135             default: /home/jenkins/openstack.creds
136             description: 'OpenStack credentials'
137         - '{slave-label}-defaults'
138         - '{installer}-defaults'
139         - string:
140             name: DOCKER_TAG
141             default: '{docker-tag}'
142             description: 'Tag to pull docker image'
143         - string:
144             name: CLEAN_DOCKER_IMAGES
145             default: 'false'
146             description: 'Remove downloaded docker images (opnfv/functest:*)'
147         - string:
148             name: DEPLOY_SCENARIO
149             default: 'os-nosdn-nofeature-ha'
150             description: 'Scenario to deploy and test'
151         # functest-suite-parameter
152         - string:
153             name: FUNCTEST_SUITE_NAME
154             default: 'doctor-notification'
155         - string:
156             name: TESTCASE_OPTIONS
157             default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor'
158             description: 'Addtional parameters specific to test case(s)'
159         # functest-parameter
160         - string:
161             name: GS_PATHNAME
162             default: '{gs-pathname}'
163             description: "Version directory where the opnfv documents will be stored in gs repository"
164         - string:
165             name: FUNCTEST_REPO_DIR
166             default: "/home/opnfv/repos/functest"
167             description: "Directory where the Functest repository is cloned"
168         - string:
169             name: PUSH_RESULTS_TO_DB
170             default: "true"
171             description: "Push the results of all the tests to the resultDB"
172         - string:
173             name: CI_DEBUG
174             default: 'true'
175             description: "Show debug output information"
176
177     scm:
178         - git-scm-gerrit
179
180     triggers:
181         - '{auto-trigger-name}':
182             project: '{project}'
183             branch: '{branch}'
184
185     builders:
186         - 'clean-workspace-log'
187         - shell: |
188             # NOTE: Create symbolic link, so that we can archive file outside
189             #       of $WORKSPACE .
190             # NOTE: We are printing all logs under 'tests/' during test run,
191             #       so this symbolic link should not be in 'tests/'. Otherwise,
192             #       we'll have the same log twice in jenkins console log.
193             ln -sfn $HOME/opnfv/functest/results/{stream} functest_results
194         - 'functest-suite-builder'
195         - shell: |
196             functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log"
197             # NOTE: checking the test result, as the previous job could return
198             #       0 regardless the result of doctor test scenario.
199             grep -e ' OK$' $functest_log || exit 1
200
201     publishers:
202         - archive:
203             artifacts: 'tests/*.log'
204         - archive:
205             artifacts: 'functest_results/{project}.log'
206
207
208 #####################################
209 # trigger macros
210 #####################################
211 - trigger:
212     name: 'doctor-verify'
213     triggers:
214         - gerrit:
215             server-name: 'gerrit.opnfv.org'
216             trigger-on:
217                 - patchset-created-event:
218                     exclude-drafts: 'false'
219                     exclude-trivial-rebase: 'false'
220                     exclude-no-code-change: 'false'
221                 - draft-published-event
222                 - comment-added-contains-event:
223                     comment-contains-value: 'recheck'
224                 - comment-added-contains-event:
225                     comment-contains-value: 'reverify'
226             projects:
227               - project-compare-type: 'ANT'
228                 project-pattern: '{project}'
229                 branches:
230                   - branch-compare-type: 'ANT'
231                     branch-pattern: '**/{branch}'
232                 file-paths:
233                   - compare-type: ANT
234                     pattern: 'tests/**'
235             skip-vote:
236                 successful: true
237                 failed: true
238                 unstable: true
239                 notbuilt: true