0d06fb7efe7760760243c9a3ba26d0faace536a8
[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         # TODO(r-mibu): enable this once joid is ready
26         #- joid:
27         #    slave-label: 'ool-virtual3'
28         #    pod: 'ool-virtual3'
29
30     inspector:
31         - 'sample'
32         - 'congress'
33
34     task:
35         - verify:
36             profiler: 'none'
37             auto-trigger-name: 'doctor-verify'
38         - profiling:
39             profiler: 'poc'
40             auto-trigger-name: 'experimental'
41
42     jobs:
43         - 'doctor-verify-{stream}'
44         - 'doctor-{task}-{installer}-{inspector}-{stream}'
45
46 - job-template:
47     name: 'doctor-verify-{stream}'
48
49     disabled: '{obj:disabled}'
50
51     parameters:
52         - project-parameter:
53             project: '{project}'
54         - gerrit-parameter:
55             branch: '{branch}'
56         - 'opnfv-build-ubuntu-defaults'
57
58     scm:
59         - git-scm-gerrit
60
61     triggers:
62         - gerrit:
63             server-name: 'gerrit.opnfv.org'
64             trigger-on:
65                 - patchset-created-event:
66                     exclude-drafts: 'false'
67                     exclude-trivial-rebase: 'false'
68                     exclude-no-code-change: 'false'
69                 - draft-published-event
70                 - comment-added-contains-event:
71                     comment-contains-value: 'recheck'
72                 - comment-added-contains-event:
73                     comment-contains-value: 'reverify'
74             projects:
75               - project-compare-type: 'ANT'
76                 project-pattern: '{project}'
77                 branches:
78                   - branch-compare-type: 'ANT'
79                     branch-pattern: '**/{branch}'
80                 file-paths:
81                   - compare-type: ANT
82                     pattern: 'tests/**'
83
84     builders:
85         - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
86
87 - job-template:
88     name: 'doctor-{task}-{installer}-{inspector}-{stream}'
89
90     node: '{slave-label}'
91
92     parameters:
93         - project-parameter:
94             project: '{project}'
95         - gerrit-parameter:
96             branch: '{branch}'
97         - string:
98             name: GIT_BRANCH
99             default: 'origin/{branch}'
100             description: "Override GIT_BRANCH parameter as we need stream name here"
101             #TODO(r-mibu): remove this work around by cleanup *_BRANCH params
102         - string:
103             name: OS_CREDS
104             default: /home/jenkins/openstack.creds
105             description: 'OpenStack credentials'
106         - '{slave-label}-defaults'
107         - '{installer}-defaults'
108         - string:
109             name: DOCKER_TAG
110             default: '{docker-tag}'
111             description: 'Tag to pull docker image'
112         - string:
113             name: CLEAN_DOCKER_IMAGES
114             default: 'false'
115             description: 'Remove downloaded docker images (opnfv/functest:*)'
116         - string:
117             name: DEPLOY_SCENARIO
118             default: 'os-nosdn-nofeature-ha'
119             description: 'Scenario to deploy and test'
120         # functest-suite-parameter
121         - string:
122             name: FUNCTEST_SUITE_NAME
123             default: '{project}'
124         - string:
125             name: TESTCASE_OPTIONS
126             default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -v $WORKSPACE:/home/opnfv/repos/doctor'
127             description: 'Addtional parameters specific to test case(s)'
128         # functest-parameter
129         - string:
130             name: GS_PATHNAME
131             default: '{gs-pathname}'
132             description: "Version directory where the opnfv documents will be stored in gs repository"
133         - string:
134             name: FUNCTEST_REPO_DIR
135             default: "/home/opnfv/repos/functest"
136             description: "Directory where the Functest repository is cloned"
137         - string:
138             name: PUSH_RESULTS_TO_DB
139             default: "true"
140             description: "Push the results of all the tests to the resultDB"
141         - string:
142             name: CI_DEBUG
143             default: 'true'
144             description: "Show debug output information"
145
146     scm:
147         - git-scm-gerrit
148
149     triggers:
150         - '{auto-trigger-name}':
151             project: '{project}'
152             branch: '{branch}'
153
154     builders:
155         - 'functest-suite-builder'
156         - shell: |
157             functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log"
158             to_be_archived="$WORKSPACE/tests/functest-{project}.log"
159             cp $functest_log $to_be_archived
160             # NOTE: checking the test result, as the previous job could return
161             #       0 regardless the result of doctor test scenario.
162             grep -e ' OK$' $functest_log || exit 1
163
164     publishers:
165         - archive:
166             artifacts: 'tests/*.log'
167
168
169 #####################################
170 # trigger macros
171 #####################################
172 - trigger:
173     name: 'doctor-verify'
174     triggers:
175         - gerrit:
176             server-name: 'gerrit.opnfv.org'
177             trigger-on:
178                 - patchset-created-event:
179                     exclude-drafts: 'false'
180                     exclude-trivial-rebase: 'false'
181                     exclude-no-code-change: 'false'
182                 - draft-published-event
183                 - comment-added-contains-event:
184                     comment-contains-value: 'recheck'
185                 - comment-added-contains-event:
186                     comment-contains-value: 'reverify'
187             projects:
188               - project-compare-type: 'ANT'
189                 project-pattern: '{project}'
190                 branches:
191                   - branch-compare-type: 'ANT'
192                     branch-pattern: '**/{branch}'
193                 file-paths:
194                   - compare-type: ANT
195                     pattern: 'tests/**'
196             skip-vote:
197                 successful: true
198                 failed: true
199                 unstable: true
200                 notbuilt: true