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