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