f1d0cdb1d712994240e0ab8552427f5d1ff4d665
[ci-management.git] / jjb / sweetcomb / sweetcomb.yaml
1 ---
2 #########################################################################
3 #
4 # Copyright (c) 2018 Intel and/or its affiliates.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at:
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #########################################################################
17
18 - project:
19     name: sweetcomb
20     jobs:
21       - 'sweetcomb-verify-{stream}-{os}'
22       - 'sweetcomb-merge-{stream}-{os}'
23       # - 'sweetcomb-test-{stream}-ubuntu1604'
24
25     project: 'sweetcomb'
26     os:
27       - ubuntu1604:
28           repo-os-part: 'ubuntu.xenial.main'
29       - centos7:
30           repo-os-part: 'centos7'
31     stream:
32       - master:
33           branch: 'master'
34           repo-stream-part: 'master'
35       - '1908':
36           branch: 'stable/1908'
37           repo-stream-part: 'stable.1908'
38       - '1904':
39           branch: 'stable/1904'
40           repo-stream-part: 'stable.1904'
41       - '1901':
42           branch: 'stable/1901'
43           repo-stream-part: 'stable.1901'
44       - vom:
45           branch: 'vom'
46           repo-stream-part: 'vom'
47
48 - project:
49     name: sweetcomb-view
50     views:
51       - project-view
52     project-name: sweetcomb
53
54 - job-template:
55     name: 'sweetcomb-verify-{stream}-{os}'
56
57     project-type: freestyle
58     node: '{os}-us'
59     concurrent: true
60
61     build-discarder:
62       daysToKeep: '{build-days-to-keep}'
63       numToKeep: 100
64       artifactDaysToKeep: '{build-artifact-days-to-keep}'
65       artifactNumToKeep: '{build-artifact-num-to-keep}'
66
67     parameters:
68       - project-parameter:
69           project: '{project}'
70       - gerrit-parameter:
71           branch: '{branch}'
72       - os-parameter:
73           os: '{os}'
74       - repo-name-parameter:
75           repo-name: '{repo-stream-part}.{repo-os-part}'
76       - stream-parameter:
77           stream: '{stream}'
78       - string:
79           name: ARCHIVE_ARTIFACTS
80           default: '{archive-artifacts}'
81           description: Artifacts to archive to the logs server.
82
83     scm:
84       - gerrit-trigger-scm:
85           credentials-id: 'jenkins-gerrit-credentials'
86           refspec: '$GERRIT_REFSPEC'
87           choosing-strategy: 'gerrit'
88
89     wrappers:
90       - fdio-infra-wrappers:
91           build-timeout: 120
92
93     triggers:
94       - gerrit-trigger-checkstyle:
95           name: '{project}'
96           branch: '{branch}'
97       - gerrit-trigger-patch-submitted:
98           name: '{project}'
99           branch: '{branch}'
100
101     builders:
102       - config-file-provider:
103           files:
104             - file-id: '.packagecloud'
105               target: '/root'
106       - config-file-provider:
107           files:
108             - file-id: 'packagecloud_api'
109               target: '/root'
110       - shell:
111           !include-raw-escape: include-raw-sweetcomb-checkstyle.sh
112       - shell:
113           !include-raw-escape:
114           - include-raw-sweetcomb-build.sh
115     publishers:
116       - lf-infra-publish
117       - naginator:
118           rerun-unstable-builds: false
119           max-failed-builds: 1
120           fixed-delay: 90
121
122 - job-template:
123     name: 'sweetcomb-merge-{stream}-{os}'
124
125     project-type: freestyle
126     node: '{os}-us'
127
128     build-discarder:
129       daysToKeep: '{build-days-to-keep}'
130       numToKeep: 100
131       artifactDaysToKeep: '{build-artifact-days-to-keep}'
132       artifactNumToKeep: '{build-artifact-num-to-keep}'
133
134     parameters:
135       - project-parameter:
136           project: '{project}'
137       - gerrit-parameter:
138           branch: '{branch}'
139       - os-parameter:
140           os: '{os}'
141       - stream-parameter:
142           stream: '{stream}'
143       - repo-name-parameter:
144           repo-name: '{repo-stream-part}.{repo-os-part}'
145       - string:
146           name: ARCHIVE_ARTIFACTS
147           default: '{archive-artifacts}'
148           description: Artifacts to archive to the logs server.
149
150     scm:
151       - gerrit-trigger-scm:
152           credentials-id: 'jenkins-gerrit-credentials'
153           refspec: ''
154           choosing-strategy: 'default'
155
156     wrappers:
157       - fdio-infra-wrappers:
158           build-timeout: '{build-timeout}'
159
160     triggers:
161       - gerrit-trigger-patch-merged:
162           name: '{project}'
163           branch: '{branch}'
164
165     builders:
166       - config-file-provider:
167           files:
168             - file-id: '.packagecloud'
169               target: '/root'
170       - config-file-provider:
171           files:
172             - file-id: 'packagecloud_api'
173               target: '/root'
174       - shell:
175           !include-raw-escape: include-raw-sweetcomb-checkstyle.sh
176       - shell:
177           !include-raw-escape:
178           - include-raw-sweetcomb-build.sh
179       - shell:
180           !include-raw-escape:
181           - ../scripts/packagecloud_push.sh
182     publishers:
183       - lf-infra-publish
184       - naginator:
185           rerun-unstable-builds: false
186           max-failed-builds: 1
187           fixed-delay: 90
188
189 - job-template:
190     name: 'sweetcomb-test-{stream}-ubuntu1604'
191
192     project-type: freestyle
193     node: 'ubuntu1604-us'
194     concurrent: true
195
196     build-discarder:
197       daysToKeep: '{build-days-to-keep}'
198       numToKeep: 100
199       artifactDaysToKeep: '{build-artifact-days-to-keep}'
200       artifactNumToKeep: '{build-artifact-num-to-keep}'
201
202     parameters:
203       - project-parameter:
204           project: '{project}'
205       - gerrit-parameter:
206           branch: '{branch}'
207       - os-parameter:
208           os: 'ubuntu1604'
209       - repo-name-parameter:
210           repo-name: '{repo-stream-part}.ubuntu.xenial.main'
211       - stream-parameter:
212           stream: '{stream}'
213
214     scm:
215       - gerrit-trigger-scm:
216           credentials-id: 'jenkins-gerrit-credentials'
217           refspec: '$GERRIT_REFSPEC'
218           choosing-strategy: 'gerrit'
219
220     wrappers:
221       - fdio-infra-wrappers:
222           build-timeout: 120
223
224     triggers:
225       - gerrit-trigger-patch-submitted:
226           name: '{project}'
227           branch: '{branch}'
228
229     builders:
230       - config-file-provider:
231           files:
232             - file-id: '.packagecloud'
233               target: '/root'
234       - config-file-provider:
235           files:
236             - file-id: 'packagecloud_api'
237               target: '/root'
238       - shell:
239           !include-raw-escape:
240           - include-raw-sweetcomb-build.sh
241           - include-raw-sweetcomb-test.sh
242     publishers:
243       - lf-infra-publish
244       - naginator:
245           rerun-unstable-builds: false
246           max-failed-builds: 1
247           fixed-delay: 90
248
249 - project:
250     name: sweetcomb-info
251     project-name: sweetcomb
252     jobs:
253       - gerrit-info-yaml-verify
254     build-node: centos7-builder-4c-4g
255     project: sweetcomb
256     branch: master