ece59b2c2ecb1edbaee879dc3c68633c23a700fd
[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         - '{installer}-defaults'
113         - 'compass-verify-defaults':
114             installer: '{installer}'
115             gs-pathname: '{gs-pathname}'
116         - string:
117             name: DEPLOY_SCENARIO
118             default: 'os-nosdn-nofeature-ha'
119
120     builders:
121         - description-setter:
122             description: "Built on $NODE_NAME"
123         - multijob:
124             name: basic
125             condition: SUCCESSFUL
126             projects:
127                 - name: 'compass-verify-basic-{stream}'
128                   current-parameters: true
129                   node-parameters: true
130                   kill-phase-on: FAILURE
131                   abort-all-job: true
132         - multijob:
133             name: deploy-virtual
134             condition: SUCCESSFUL
135             projects:
136                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
137                   current-parameters: true
138                   predefined-parameters: |
139                     COMPASS_OS_VERSION={os-version}
140                     COMPASS_OS_VERSION_OPTION={openstack-os-version}
141                   node-parameters: true
142                   kill-phase-on: FAILURE
143                   abort-all-job: true
144         - multijob:
145             name: smoke-test
146             condition: SUCCESSFUL
147             projects:
148                 - name: 'functest-compass-virtual-suite-{stream}'
149                   current-parameters: true
150                   predefined-parameters:
151                     FUNCTEST_SUITE_NAME=healthcheck
152                   node-parameters: true
153                   kill-phase-on: NEVER
154                   abort-all-job: true
155
156 - job-template:
157     name: 'compass-verify-{phase}-{distro}-{stream}'
158
159     disabled: '{obj:disabled}'
160
161     concurrent: true
162
163     properties:
164         - throttle:
165             enabled: true
166             max-per-node: 1
167             option: 'project'
168         - build-blocker:
169             use-build-blocker: true
170             blocking-jobs:
171                 - 'compass-os-.*?-virtual-daily-.*?'
172                 - 'compass-verify-deploy-.*'
173                 - 'functest-compass-virtual.*'
174             block-level: 'NODE'
175
176     scm:
177         - gerrit-trigger-scm:
178             credentials-id: '{ssh-credentials}'
179             refspec: '$GERRIT_REFSPEC'
180             choosing-strategy: 'gerrit'
181
182     wrappers:
183         - ssh-agent-credentials:
184             users:
185                 - '{ssh-credentials}'
186         - timeout:
187             timeout: 120
188             fail: true
189
190     builders:
191         - description-setter:
192             description: "Built on $NODE_NAME"
193         - '{project}-verify-{phase}-macro'
194
195     publishers:
196         - archive:
197             artifacts: 'ansible.log'
198             allow-empty: 'true'
199             fingerprint: true
200 #####################################
201 # builder macros
202 #####################################
203 - builder:
204     name: 'compass4nfv-verify-basic-macro'
205     builders:
206         - shell: |
207             #!/bin/bash
208
209             echo "Not activated!"
210
211 - builder:
212     name: 'compass4nfv-verify-deploy-virtual-macro'
213     builders:
214         - shell:
215             !include-raw: ./compass-build.sh
216         - shell:
217             !include-raw: ./compass-deploy.sh
218 #####################################
219 # parameter macros
220 #####################################
221 - parameter:
222     name: 'compass-verify-defaults'
223     parameters:
224         - string:
225             name: BUILD_DIRECTORY
226             default: $WORKSPACE/build_output
227             description: "Directory where the build artifact will be located upon the completion of the build."
228         - string:
229             name: CACHE_DIRECTORY
230             default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
231             description: "Directory where the cache to be used during the build is located."
232         - string:
233             name: GS_URL
234             default: '$GS_BASE{gs-pathname}'
235             description: "URL to Google Storage."
236         - string:
237             name: PPA_REPO
238             default: "http://205.177.226.237:9999{gs-pathname}"
239         - string:
240             name: PPA_CACHE
241             default: "$WORKSPACE/work/repo/"
242         - choice:
243             name: COMPASS_OPENSTACK_VERSION
244             choices:
245                 - 'newton'
246                 - 'mitaka'
247                 - 'liberty'
248         - choice:
249             name: COMPASS_OS_VERSION
250             choices:
251                 - 'trusty'
252                 - 'centos7'