9382144852e773a16c309f9cb095f412c3cbfcbe
[releng.git] / jjb / compass4nfv / compass-verify-jobs.yml
1 - project:
2     name: 'compass-verify-jobs'
3
4     project: 'compass4nfv'
5
6     installer: 'compass'
7 #####################################
8 # branch definitions
9 #####################################
10     stream:
11         - master:
12             branch: '{stream}'
13             gs-pathname: ''
14             disabled: false
15         - colorado:
16             branch: 'stable/{stream}'
17             gs-pathname: '/{stream}'
18             disabled: true
19
20     distro:
21         - 'trusty':
22             disabled: false
23             os-version: 'trusty'
24             openstack-os-version: ''
25         - 'centos7':
26             disabled: false
27             os-version: 'centos7'
28             openstack-os-version: ''
29 #####################################
30 # patch verification phases
31 #####################################
32     phase:
33         - 'basic'
34         - 'deploy-virtual'
35 #####################################
36 # jobs
37 #####################################
38     jobs:
39         - 'compass-verify-{distro}-{stream}'
40         - 'compass-verify-{phase}-{distro}-{stream}'
41 #####################################
42 # job templates
43 #####################################
44 - job-template:
45     name: 'compass-verify-{distro}-{stream}'
46
47     project-type: multijob
48
49     disabled: '{obj:disabled}'
50
51     concurrent: true
52
53     properties:
54         - throttle:
55             enabled: true
56             max-total: 4
57             max-per-node: 1
58             option: 'project'
59         - build-blocker:
60             use-build-blocker: true
61             blocking-jobs:
62                 - 'compass-verify-[^-]*-[^-]*'
63                 - 'compass-os-.*?-virtual-daily-.*?'
64             block-level: 'NODE'
65
66     scm:
67         - gerrit-trigger-scm:
68             credentials-id: '{ssh-credentials}'
69             refspec: '$GERRIT_REFSPEC'
70             choosing-strategy: 'gerrit'
71
72     wrappers:
73         - ssh-agent-credentials:
74             users:
75                 - '{ssh-credentials}'
76         - timeout:
77             timeout: 120
78             fail: true
79
80     triggers:
81         - gerrit:
82             server-name: 'gerrit.opnfv.org'
83             trigger-on:
84                 - patchset-created-event:
85                     exclude-drafts: 'false'
86                     exclude-trivial-rebase: 'false'
87                     exclude-no-code-change: 'false'
88                 - draft-published-event
89                 - comment-added-contains-event:
90                     comment-contains-value: 'recheck'
91                 - comment-added-contains-event:
92                     comment-contains-value: 'reverify'
93             projects:
94               - project-compare-type: 'ANT'
95                 project-pattern: '{project}'
96                 branches:
97                   - branch-compare-type: 'ANT'
98                     branch-pattern: '**/{branch}'
99                 file-paths:
100                   - compare-type: ANT
101                     pattern: '**/*'
102                 forbidden-file-paths:
103                   - compare-type: ANT
104                     pattern: 'docs/**'
105             readable-message: true
106
107     parameters:
108         - project-parameter:
109             project: '{project}'
110         - gerrit-parameter:
111             branch: '{branch}'
112         - 'compass-virtual-defaults'
113         - '{installer}-defaults'
114         - 'compass-verify-defaults':
115             installer: '{installer}'
116             gs-pathname: '{gs-pathname}'
117         - string:
118             name: DEPLOY_SCENARIO
119             default: 'os-nosdn-nofeature-ha'
120
121     builders:
122         - description-setter:
123             description: "Built on $NODE_NAME"
124         - multijob:
125             name: basic
126             condition: SUCCESSFUL
127             projects:
128                 - name: 'opnfv-lint-verify-{stream}'
129                   current-parameters: true
130                   node-parameters: true
131                   kill-phase-on: FAILURE
132                   abort-all-job: true
133         - multijob:
134             name: deploy-virtual
135             condition: SUCCESSFUL
136             projects:
137                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
138                   current-parameters: true
139                   predefined-parameters: |
140                     COMPASS_OS_VERSION={os-version}
141                     COMPASS_OS_VERSION_OPTION={openstack-os-version}
142                   node-parameters: true
143                   kill-phase-on: FAILURE
144                   abort-all-job: true
145         - multijob:
146             name: smoke-test
147             condition: SUCCESSFUL
148             projects:
149                 - name: 'functest-compass-virtual-suite-{stream}'
150                   current-parameters: true
151                   predefined-parameters:
152                     FUNCTEST_SUITE_NAME=healthcheck
153                   node-parameters: true
154                   kill-phase-on: NEVER
155                   abort-all-job: true
156
157 - job-template:
158     name: 'compass-verify-{phase}-{distro}-{stream}'
159
160     disabled: '{obj:disabled}'
161
162     concurrent: true
163
164     properties:
165         - throttle:
166             enabled: true
167             max-per-node: 1
168             option: 'project'
169         - build-blocker:
170             use-build-blocker: true
171             blocking-jobs:
172                 - 'compass-os-.*?-virtual-daily-.*?'
173                 - 'compass-verify-deploy-.*'
174                 - 'functest-compass-virtual.*'
175             block-level: 'NODE'
176
177     scm:
178         - gerrit-trigger-scm:
179             credentials-id: '{ssh-credentials}'
180             refspec: '$GERRIT_REFSPEC'
181             choosing-strategy: 'gerrit'
182
183     wrappers:
184         - ssh-agent-credentials:
185             users:
186                 - '{ssh-credentials}'
187         - timeout:
188             timeout: 120
189             fail: true
190
191     builders:
192         - description-setter:
193             description: "Built on $NODE_NAME"
194         - '{project}-verify-{phase}-macro'
195
196     publishers:
197         - archive:
198             artifacts: 'ansible.log'
199             allow-empty: 'true'
200             fingerprint: true
201 #####################################
202 # builder macros
203 #####################################
204 - builder:
205     name: 'compass4nfv-verify-basic-macro'
206     builders:
207         - shell: |
208             #!/bin/bash
209
210             echo "Not activated!"
211
212 - builder:
213     name: 'compass4nfv-verify-deploy-virtual-macro'
214     builders:
215         - shell:
216             !include-raw: ./compass-build.sh
217         - shell:
218             !include-raw: ./compass-deploy.sh
219 #####################################
220 # parameter macros
221 #####################################
222 - parameter:
223     name: 'compass-verify-defaults'
224     parameters:
225         - string:
226             name: BUILD_DIRECTORY
227             default: $WORKSPACE/build_output
228             description: "Directory where the build artifact will be located upon the completion of the build."
229         - string:
230             name: CACHE_DIRECTORY
231             default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
232             description: "Directory where the cache to be used during the build is located."
233         - string:
234             name: GS_URL
235             default: '$GS_BASE{gs-pathname}'
236             description: "URL to Google Storage."
237         - string:
238             name: PPA_REPO
239             default: "http://205.177.226.237:9999{gs-pathname}"
240         - string:
241             name: PPA_CACHE
242             default: "$WORKSPACE/work/repo/"
243         - choice:
244             name: COMPASS_OPENSTACK_VERSION
245             choices:
246                 - 'mitaka'
247                 - 'newton'
248                 - 'liberty'
249         - choice:
250             name: COMPASS_OS_VERSION
251             choices:
252                 - 'trusty'
253                 - 'centos7'