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