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