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