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