290da36dc36c4c3ae452beb1ee864e3e3950cf92
[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             trigger-on:
83                 - patchset-created-event:
84                     exclude-drafts: 'false'
85                     exclude-trivial-rebase: 'false'
86                     exclude-no-code-change: 'false'
87                 - draft-published-event
88                 - comment-added-contains-event:
89                     comment-contains-value: 'recheck'
90                 - comment-added-contains-event:
91                     comment-contains-value: 'reverify'
92             projects:
93               - project-compare-type: 'ANT'
94                 project-pattern: '{project}'
95                 branches:
96                   - branch-compare-type: 'ANT'
97                     branch-pattern: '**/{branch}'
98                 file-paths:
99                   - compare-type: ANT
100                     pattern: '**/*'
101                 forbidden-file-paths:
102                   - compare-type: ANT
103                     pattern: 'docs/**'
104             readable-message: true
105
106     parameters:
107         - project-parameter:
108             project: '{project}'
109         - gerrit-parameter:
110             branch: '{branch}'
111         - 'compass-virtual-defaults'
112         - 'compass-verify-defaults':
113             installer: '{installer}'
114             gs-pathname: '{gs-pathname}'
115         - string:
116             name: DEPLOY_SCENARIO
117             default: 'os-nosdn-nofeature-ha'
118
119     builders:
120         - description-setter:
121             description: "Built on $NODE_NAME"
122         - multijob:
123             name: basic
124             condition: SUCCESSFUL
125             projects:
126                 - name: 'compass-verify-basic-{stream}'
127                   current-parameters: true
128                   node-parameters: true
129                   kill-phase-on: FAILURE
130                   abort-all-job: true
131         - multijob:
132             name: deploy-virtual
133             condition: SUCCESSFUL
134             projects:
135                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
136                   current-parameters: true
137                   predefined-parameters: |
138                     COMPASS_OS_VERSION={os-version}
139                     COMPASS_OS_VERSION_OPTION={openstack-os-version}
140                   node-parameters: true
141                   kill-phase-on: FAILURE
142                   abort-all-job: true
143         - multijob:
144             name: smoke-test
145             condition: SUCCESSFUL
146             projects:
147                 - name: 'functest-compass-virtual-suite-{stream}'
148                   current-parameters: true
149                   predefined-parameters:
150                     FUNCTEST_SUITE_NAME=healthcheck
151                   node-parameters: true
152                   kill-phase-on: NEVER
153                   abort-all-job: true
154
155 - job-template:
156     name: 'compass-verify-{phase}-{distro}-{stream}'
157
158     disabled: '{obj:disabled}'
159
160     concurrent: true
161
162     properties:
163         - throttle:
164             enabled: true
165             max-per-node: 1
166             option: 'project'
167         - build-blocker:
168             use-build-blocker: true
169             blocking-jobs:
170                 - 'compass-os-.*?-virtual-daily-.*?'
171                 - 'compass-verify-deploy-.*'
172                 - 'functest-compass-virtual.*'
173             block-level: 'NODE'
174
175     scm:
176         - gerrit-trigger-scm:
177             credentials-id: '{ssh-credentials}'
178             refspec: '$GERRIT_REFSPEC'
179             choosing-strategy: 'gerrit'
180
181     wrappers:
182         - ssh-agent-credentials:
183             users:
184                 - '{ssh-credentials}'
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                 - 'mitaka'
245                 - 'liberty'
246         - choice:
247             name: COMPASS_OS_VERSION
248             choices:
249                 - 'trusty'
250                 - 'centos7'