[doctor] add postbuildscript for functest log
[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         - 'functest-suite-builder'
149         - shell: |
150             functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log"
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         - postbuildscript:
157             builders:
158                 - shell: |
159                     cp $HOME/opnfv/functest/results/{stream}/{project}.log \
160                     tests/functest-{project}.log
161             script-only-if-succeeded: False
162             script-only-if-failed: False
163         - archive:
164             artifacts: 'tests/*.log'
165
166
167 #####################################
168 # trigger macros
169 #####################################
170 - trigger:
171     name: 'doctor-verify'
172     triggers:
173         - gerrit:
174             server-name: 'gerrit.opnfv.org'
175             trigger-on:
176                 - patchset-created-event:
177                     exclude-drafts: 'false'
178                     exclude-trivial-rebase: 'false'
179                     exclude-no-code-change: 'false'
180                 - draft-published-event
181                 - comment-added-contains-event:
182                     comment-contains-value: 'recheck'
183                 - comment-added-contains-event:
184                     comment-contains-value: 'reverify'
185             projects:
186               - project-compare-type: 'ANT'
187                 project-pattern: '{project}'
188                 branches:
189                   - branch-compare-type: 'ANT'
190                     branch-pattern: '**/{branch}'
191                 file-paths:
192                   - compare-type: ANT
193                     pattern: 'tests/**'
194             skip-vote:
195                 successful: true
196                 failed: true
197                 unstable: true
198                 notbuilt: true