fix the log name of functest result for doctor project
[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
118     builders:
119         - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
120
121
122 - job-template:
123     name: 'doctor-{task}-{installer}-{inspector}-{stream}'
124
125     node: '{slave-label}'
126
127     parameters:
128         - project-parameter:
129             project: '{project}'
130             branch: '{branch}'
131         - string:
132             name: OS_CREDS
133             default: /home/jenkins/openstack.creds
134             description: 'OpenStack credentials'
135         - '{slave-label}-defaults'
136         - '{installer}-defaults'
137         - string:
138             name: DOCKER_TAG
139             default: '{docker-tag}'
140             description: 'Tag to pull docker image'
141         - string:
142             name: CLEAN_DOCKER_IMAGES
143             default: 'false'
144             description: 'Remove downloaded docker images (opnfv/functest:*)'
145         - string:
146             name: DEPLOY_SCENARIO
147             default: 'os-nosdn-nofeature-ha'
148             description: 'Scenario to deploy and test'
149         # functest-suite-parameter
150         - string:
151             name: FUNCTEST_SUITE_NAME
152             default: 'doctor-notification'
153         - string:
154             name: TESTCASE_OPTIONS
155             default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor'
156             description: 'Addtional parameters specific to test case(s)'
157         # functest-parameter
158         - string:
159             name: GS_PATHNAME
160             default: '{gs-pathname}'
161             description: "Version directory where the opnfv documents will be stored in gs repository"
162         - string:
163             name: FUNCTEST_REPO_DIR
164             default: "/home/opnfv/repos/functest"
165             description: "Directory where the Functest repository is cloned"
166         - string:
167             name: PUSH_RESULTS_TO_DB
168             default: "true"
169             description: "Push the results of all the tests to the resultDB"
170         - string:
171             name: CI_DEBUG
172             default: 'true'
173             description: "Show debug output information"
174
175     scm:
176         - git-scm-gerrit
177
178     triggers:
179         - '{auto-trigger-name}':
180             project: '{project}'
181             branch: '{branch}'
182
183     builders:
184         - 'clean-workspace-log'
185         - shell: |
186             # NOTE: Create symbolic link, so that we can archive file outside
187             #       of $WORKSPACE .
188             # NOTE: We are printing all logs under 'tests/' during test run,
189             #       so this symbolic link should not be in 'tests/'. Otherwise,
190             #       we'll have the same log twice in jenkins console log.
191             ln -sfn $HOME/opnfv/functest/results/{stream} functest_results
192             # NOTE: Get functest script in $WORKSPACE. This functest script is
193             #       needed to perform VM image download in set-functest-env.sh
194             #       from E release cycle.
195             mkdir -p functest/ci
196             wget https://git.opnfv.org/functest/plain/functest/ci/download_images.sh -O functest/ci/download_images.sh
197         - 'functest-suite-builder'
198         - shell: |
199             functest_log="$HOME/opnfv/functest/results/{stream}/$FUNCTEST_SUITE_NAME.log"
200             # NOTE: checking the test result, as the previous job could return
201             #       0 regardless the result of doctor test scenario.
202             grep -e ' OK$' $functest_log || exit 1
203
204     publishers:
205         - archive:
206             artifacts: 'tests/*.log'
207         - archive:
208             artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log'
209
210
211 #####################################
212 # trigger macros
213 #####################################
214 - trigger:
215     name: 'doctor-verify'
216     triggers:
217         - gerrit:
218             server-name: 'gerrit.opnfv.org'
219             trigger-on:
220                 - patchset-created-event:
221                     exclude-drafts: 'false'
222                     exclude-trivial-rebase: 'false'
223                     exclude-no-code-change: 'false'
224                 - draft-published-event
225                 - comment-added-contains-event:
226                     comment-contains-value: 'recheck'
227                 - comment-added-contains-event:
228                     comment-contains-value: 'reverify'
229             projects:
230               - project-compare-type: 'ANT'
231                 project-pattern: '{project}'
232                 branches:
233                   - branch-compare-type: 'ANT'
234                     branch-pattern: '**/{branch}'
235                 file-paths:
236                   - compare-type: ANT
237                     pattern: 'tests/**'
238             skip-vote:
239                 successful: true
240                 failed: true
241                 unstable: true
242                 notbuilt: true