Merge "Compass4NFV CI verify support centos7"
[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         - danube:
16             branch: 'stable/{stream}'
17             gs-pathname: '/{stream}'
18             disabled: false
19
20     distro:
21         - 'xenial':
22             disabled: false
23             os-version: 'xenial'
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         - git-scm-gerrit
68
69     wrappers:
70         - ssh-agent-wrapper
71         - timeout:
72             timeout: 120
73             fail: true
74
75     triggers:
76         - gerrit:
77             server-name: 'gerrit.opnfv.org'
78             trigger-on:
79                 - patchset-created-event:
80                     exclude-drafts: 'false'
81                     exclude-trivial-rebase: 'false'
82                     exclude-no-code-change: 'false'
83                 - draft-published-event
84                 - comment-added-contains-event:
85                     comment-contains-value: 'recheck'
86                 - comment-added-contains-event:
87                     comment-contains-value: 'reverify'
88             projects:
89               - project-compare-type: 'ANT'
90                 project-pattern: '{project}'
91                 branches:
92                   - branch-compare-type: 'ANT'
93                     branch-pattern: '**/{branch}'
94                 file-paths:
95                   - compare-type: ANT
96                     pattern: '**/*'
97                 forbidden-file-paths:
98                   - compare-type: ANT
99                     pattern: 'docs/**'
100             readable-message: true
101
102     parameters:
103         - project-parameter:
104             project: '{project}'
105         - gerrit-parameter:
106             branch: '{branch}'
107         - 'compass-virtual-defaults'
108         - '{installer}-defaults'
109         - 'compass-verify-defaults':
110             installer: '{installer}'
111             gs-pathname: '{gs-pathname}'
112         - string:
113             name: DEPLOY_SCENARIO
114             default: 'os-nosdn-nofeature-ha'
115
116     builders:
117         - description-setter:
118             description: "Built on $NODE_NAME"
119         - multijob:
120             name: basic
121             condition: SUCCESSFUL
122             projects:
123                 - name: 'opnfv-lint-verify-{stream}'
124                   current-parameters: true
125                   node-parameters: true
126                   kill-phase-on: FAILURE
127                   abort-all-job: true
128         - multijob:
129             name: deploy-virtual
130             condition: SUCCESSFUL
131             projects:
132                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
133                   current-parameters: true
134                   predefined-parameters: |
135                     COMPASS_OS_VERSION={os-version}
136                   node-parameters: true
137                   kill-phase-on: FAILURE
138                   abort-all-job: true
139         - multijob:
140             name: smoke-test
141             condition: SUCCESSFUL
142             projects:
143                 - name: 'functest-compass-virtual-suite-{stream}'
144                   current-parameters: true
145                   predefined-parameters:
146                     FUNCTEST_SUITE_NAME=healthcheck
147                   node-parameters: true
148                   kill-phase-on: NEVER
149                   abort-all-job: true
150                 - name: 'functest-compass-virtual-suite-{stream}'
151                   current-parameters: true
152                   predefined-parameters:
153                     FUNCTEST_SUITE_NAME=vping_ssh
154                   node-parameters: true
155                   kill-phase-on: NEVER
156                   abort-all-job: true
157
158 - job-template:
159     name: 'compass-verify-{phase}-{distro}-{stream}'
160
161     disabled: '{obj:disabled}'
162
163     concurrent: true
164
165     properties:
166         - throttle:
167             enabled: true
168             max-per-node: 1
169             option: 'project'
170         - build-blocker:
171             use-build-blocker: true
172             blocking-jobs:
173                 - 'compass-os-.*?-virtual-daily-.*?'
174                 - 'compass-verify-deploy-.*'
175                 - 'functest-compass-virtual.*'
176             block-level: 'NODE'
177
178     scm:
179         - git-scm-gerrit
180
181     wrappers:
182         - ssh-agent-wrapper
183         - timeout:
184             timeout: 120
185             fail: true
186
187     builders:
188         - description-setter:
189             description: "Built on $NODE_NAME"
190         - '{project}-verify-{phase}-macro'
191
192     publishers:
193         - archive:
194             artifacts: 'ansible.log'
195             allow-empty: 'true'
196             fingerprint: true
197 #####################################
198 # builder macros
199 #####################################
200 - builder:
201     name: 'compass4nfv-verify-basic-macro'
202     builders:
203         - shell: |
204             #!/bin/bash
205
206             echo "Not activated!"
207
208 - builder:
209     name: 'compass4nfv-verify-deploy-virtual-macro'
210     builders:
211         - shell:
212             !include-raw: ./compass-build.sh
213         - shell:
214             !include-raw: ./compass-deploy.sh
215 #####################################
216 # parameter macros
217 #####################################
218 - parameter:
219     name: 'compass-verify-defaults'
220     parameters:
221         - string:
222             name: BUILD_DIRECTORY
223             default: $WORKSPACE/build_output
224             description: "Directory where the build artifact will be located upon the completion of the build."
225         - string:
226             name: CACHE_DIRECTORY
227             default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
228             description: "Directory where the cache to be used during the build is located."
229         - string:
230             name: GS_URL
231             default: '$GS_BASE{gs-pathname}'
232             description: "URL to Google Storage."
233         - string:
234             name: PPA_REPO
235             default: "http://205.177.226.237:9999{gs-pathname}"
236         - string:
237             name: PPA_CACHE
238             default: "$WORKSPACE/work/repo/"
239         - choice:
240             name: COMPASS_OPENSTACK_VERSION
241             choices:
242                 - 'newton'
243         - choice:
244             name: COMPASS_OS_VERSION
245             choices:
246                 - 'xenial'
247                 - 'centos7'