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