Merge "Fix bug in experimental trigger"
[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-default'
182         - string:
183             name: PROFILER
184             default: poc
185             description: "Profiler to be used"
186
187     scm:
188         - git-scm-gerrit
189
190     triggers:
191         - 'experimental':
192             project: '{project}'
193             branch: '{branch}'
194
195 #####################################
196 # parameter macros
197 #####################################
198 # TODO(yujunz) replace common parameter in doctor-verify-{stream} with macro
199 - parameter:
200     name: 'doctor-default'
201     parameters:
202     - project-parameter:
203         project: '{project}'
204     - gerrit-parameter:
205         branch: '{branch}'
206     - 'opnfv-build-ubuntu-defaults'
207
208 #####################################
209 # trigger macros
210 #####################################
211 # TODO(yujunz) move to opnfv commom
212 - trigger:
213     name: 'experimental'
214     triggers:
215         - gerrit:
216             server-name: 'gerrit.opnfv.org'
217             trigger-on:
218                 - comment-added-contains-event:
219                     comment-contains-value: 'check experimental'
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