345c4c3fb7c11d13aab9788bfee1819b2f578a25
[releng.git] / jjb / compass4nfv / compass-project-jobs.yml
1 - project:
2
3     name: compass-project
4
5     installer: 'compass'
6
7     project: 'compass4nfv'
8
9     stream:
10         - master:
11             branch: '{stream}'
12             gs-pathname: ''
13         - brahmaputra:
14             branch: 'stable/{stream}'
15             gs-pathname: '/{stream}'
16
17
18     sdn-controller:
19         - 'nosdn':
20             disabled: false
21             node: huawei-deploy-vm
22         - 'odl':
23             disabled: false
24             node: huawei-deploy-vm
25         - 'onos':
26             disabled: false
27             node: huawei-deploy-vm
28 #        - 'opencontrail':
29 #            disabled: true
30 #            node: huawei-deploy-vm
31
32     jobs:
33         - 'compass-verify-{stream}'
34         - 'compass-build-iso-{stream}'
35         - 'compass-build-ppa-{stream}'
36         - 'compass-deploy-virtual-{sdn-controller}-{stream}'
37         - 'compass-virtual-daily-{stream}'
38
39 ########################
40 # job templates
41 ########################
42 - job-template:
43     name: 'compass-verify-{stream}'
44
45     disabled: false
46
47     node: 'huawei-deploy-vm'
48
49     concurrent: true
50
51     properties:
52         - throttle:
53             enabled: true
54             max-total: 3
55             max-per-node: 1
56
57     parameters:
58         - project-parameter:
59             project: '{project}'
60         - gerrit-parameter:
61             branch: '{branch}'
62         - compass-project-parameter:
63             installer: '{installer}'
64             gs-pathname: '{gs-pathname}'
65         - '{node}-defaults'
66         - '{installer}-defaults'
67         - string:
68             name: SDN_CONTROLLER
69             default: 'nosdn'
70
71     scm:
72         - gerrit-trigger-scm:
73             credentials-id: '{ssh-credentials}'
74             refspec: '$GERRIT_REFSPEC'
75             choosing-strategy: 'gerrit'
76
77     triggers:
78         - gerrit:
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                 forbidden-file-paths:
96                   - compare-type: ANT
97                     pattern: 'docs/**|.gitignore'
98
99     builders:
100         - shell:
101             !include-raw: ./compass-build.sh
102         - shell:
103             !include-raw: ./compass-deploy-virtual.sh
104
105     publishers:
106         - archive:
107             artifacts: 'ansible.log'
108             allow-empty: 'true'
109             fingerprint: true
110
111 - job-template:
112     name: 'compass-virtual-daily-{stream}'
113
114     node: huawei-build
115
116     concurrent: true
117
118     properties:
119         - throttle:
120             enabled: true
121             max-total: 1
122             max-per-node: 1
123
124     parameters:
125         - project-parameter:
126             project: '{project}'
127         - compass-project-parameter:
128             installer: '{installer}'
129             gs-pathname: '{gs-pathname}'
130         - '{node}-defaults'
131         - '{installer}-defaults'
132
133     scm:
134         - git-scm:
135             credentials-id: '{ssh-credentials}'
136             refspec: ''
137             branch: '{branch}'
138
139     triggers:
140         - timed: 'H 16 * * *'
141
142     builders:
143         - trigger-builds:
144           - project: 'compass-build-iso-{stream}'
145             git-revision: true
146             block: true
147         - trigger-builds:
148           - project: 'compass-deploy-virtual-nosdn-{stream}'
149             git-revision: true
150             block: false
151         - trigger-builds:
152           - project: 'compass-deploy-virtual-odl-{stream}'
153             git-revision: true
154             block: false
155         - trigger-builds:
156           - project: 'compass-deploy-virtual-onos-{stream}'
157             git-revision: true
158             block: false
159
160 - job-template:
161     name: 'compass-build-iso-{stream}'
162
163     node: ericsson-build
164
165     concurrent: true
166
167     properties:
168         - throttle:
169             enabled: true
170             max-total: 1
171             max-per-node: 1
172
173     parameters:
174         - project-parameter:
175             project: '{project}'
176         - compass-project-parameter:
177             installer: '{installer}'
178             gs-pathname: '{gs-pathname}'
179         - '{node}-defaults'
180         - '{installer}-defaults'
181
182     scm:
183         - git-scm:
184             credentials-id: '{ssh-credentials}'
185             refspec: ''
186             branch: '{branch}'
187
188     builders:
189         - shell:
190             !include-raw: ./compass-build.sh
191         - shell:
192             !include-raw: ./compass-upload-artifact.sh
193         - shell:
194             !include-raw: ./compass-workspace-cleanup.sh
195
196 - job-template:
197     name: 'compass-build-ppa-{stream}'
198
199     description: "build ppa(using docker) in huawei lab"
200
201     node: huawei-build
202
203     concurrent: true
204
205     properties:
206         - throttle:
207             enabled: true
208             max-total: 1
209             max-per-node: 1
210
211     parameters:
212         - project-parameter:
213             project: '{project}'
214         - compass-project-parameter:
215             installer: '{installer}'
216             gs-pathname: '{gs-pathname}'
217         - '{node}-defaults'
218         - '{installer}-defaults'
219     scm:
220         - git-scm:
221             credentials-id: '{ssh-credentials}'
222             refspec: ''
223             branch: '{branch}'
224
225     builders:
226         - shell:
227             !include-raw: ./compass-makeppa.sh
228
229 - job-template:
230     name: 'compass-deploy-virtual-{sdn-controller}-{stream}'
231
232     disabled: false
233
234     node: '{node}'
235
236     concurrent: true
237
238     properties:
239         - throttle:
240             enabled: true
241             max-total: 1
242             max-per-node: 1
243
244     parameters:
245         - project-parameter:
246             project: '{project}'
247         - compass-project-parameter:
248             installer: '{installer}'
249             gs-pathname: '{gs-pathname}'
250         - string:
251             name: SDN_CONTROLLER
252             default: '{sdn-controller}'
253         - string:
254             name: DEPLOY_SCENARIO
255             default: 'none'
256         - '{node}-defaults'
257         - '{installer}-defaults'
258
259     builders:
260         - shell:
261             !include-raw: ./compass-workspace-precleanup.sh
262         - shell:
263             !include-raw: ./compass-download-artifact.sh
264         - shell:
265             !include-raw: ./compass-deploy-virtual.sh
266
267     publishers:
268         - archive:
269             artifacts: 'ansible.log'
270             allow-empty: 'true'
271             fingerprint: true
272
273 ########################
274 # parameter macros
275 ########################
276 - parameter:
277     name: compass-project-parameter
278     parameters:
279         - string:
280             name: BUILD_DIRECTORY
281             default: $WORKSPACE/build_output
282             description: "Directory where the build artifact will be located upon the completion of the build."
283         - string:
284             name: CACHE_DIRECTORY
285             default: $HOME/opnfv/cache/$PROJECT
286             description: "Directory where the cache to be used during the build is located."
287         - string:
288             name: GS_URL
289             default: '$GS_BASE{gs-pathname}'
290             description: "URL to Google Storage."
291         - string:
292             name: PPA_REPO
293             default: "http://205.177.226.235:9999"
294         - string:
295             name: PPA_CACHE
296             default: "$WORKSPACE/work/repo/"
297         - choice:
298             name: COMPASS_OPENSTACK_VERSION
299             choices:
300                 - 'liberty'
301                 - 'juno'
302         - choice:
303             name: COMPASS_OS_VERSION
304             choices:
305                 - 'trusty'
306                 - 'centos7'
307