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