e8b814cc6adb16427102396adcb35840ddfb3b6b
[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         - 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: OS_CREDS
99             default: /home/jenkins/openstack.creds
100             description: 'OpenStack credentials'
101         - '{slave-label}-defaults'
102         - '{installer}-defaults'
103         - string:
104             name: DOCKER_TAG
105             default: '{docker-tag}'
106             description: 'Tag to pull docker image'
107         - string:
108             name: CLEAN_DOCKER_IMAGES
109             default: 'false'
110             description: 'Remove downloaded docker images (opnfv/functest:*)'
111         - string:
112             name: DEPLOY_SCENARIO
113             default: 'os-nosdn-nofeature-ha'
114             description: 'Scenario to deploy and test'
115         # functest-suite-parameter
116         - string:
117             name: FUNCTEST_SUITE_NAME
118             default: '{project}'
119         - string:
120             name: TESTCASE_OPTIONS
121             default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -v $WORKSPACE:/home/opnfv/repos/doctor'
122             description: 'Addtional parameters specific to test case(s)'
123         # functest-parameter
124         - string:
125             name: GS_PATHNAME
126             default: '{gs-pathname}'
127             description: "Version directory where the opnfv documents will be stored in gs repository"
128         - string:
129             name: FUNCTEST_REPO_DIR
130             default: "/home/opnfv/repos/functest"
131             description: "Directory where the Functest repository is cloned"
132         - string:
133             name: PUSH_RESULTS_TO_DB
134             default: "true"
135             description: "Push the results of all the tests to the resultDB"
136         - string:
137             name: CI_DEBUG
138             default: 'true'
139             description: "Show debug output information"
140
141     scm:
142         - git-scm-gerrit
143
144     triggers:
145         - '{auto-trigger-name}':
146             project: '{project}'
147             branch: '{branch}'
148
149     builders:
150         - 'functest-suite-builder'
151         - shell: |
152             functest_log="$HOME/opnfv/functest/results/{project}.log"
153             to_be_archived="$WORKSPACE/tests/functest-{project}.log"
154             cp $functest_log $to_be_archived
155             # NOTE: checking the test result, as the previous job could return
156             #       0 regardless the result of doctor test scenario.
157             grep -e ' OK$' $functest_log || exit 1
158
159     publishers:
160         - archive:
161             artifacts: 'tests/*.log'
162
163
164 #####################################
165 # trigger macros
166 #####################################
167 - trigger:
168     name: 'doctor-verify'
169     triggers:
170         - gerrit:
171             server-name: 'gerrit.opnfv.org'
172             trigger-on:
173                 - patchset-created-event:
174                     exclude-drafts: 'false'
175                     exclude-trivial-rebase: 'false'
176                     exclude-no-code-change: 'false'
177                 - draft-published-event
178                 - comment-added-contains-event:
179                     comment-contains-value: 'recheck'
180                 - comment-added-contains-event:
181                     comment-contains-value: 'reverify'
182             projects:
183               - project-compare-type: 'ANT'
184                 project-pattern: '{project}'
185                 branches:
186                   - branch-compare-type: 'ANT'
187                     branch-pattern: '**/{branch}'
188                 file-paths:
189                   - compare-type: ANT
190                     pattern: 'tests/**'
191             skip-vote:
192                 successful: true
193                 failed: true
194                 unstable: true
195                 notbuilt: true