803a781f8a0de3eb24f3e9addfd7ca51fcac2425
[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       - '1904':
36           branch: 'stable/1904'
37           repo-stream-part: 'stable.1904'
38       - '1901':
39           branch: 'stable/1901'
40           repo-stream-part: 'stable.1901'
41       - vom:
42           branch: 'vom'
43           repo-stream-part: 'vom'
44
45 - project:
46     name: sweetcomb-view
47     views:
48       - project-view
49     project-name: sweetcomb
50
51 - job-template:
52     name: 'sweetcomb-verify-{stream}-{os}'
53
54     project-type: freestyle
55     node: '{os}-us'
56     concurrent: true
57     archive-artifacts: >
58       **/build-root/build-package/*.rpm
59       **/build-root/build-package/*.deb
60     allow-empty: 'true'
61     fingerprint: false
62     only-if-success: true
63     default-excludes: false
64
65     build-discarder:
66       daysToKeep: '{build-days-to-keep}'
67       numToKeep: 100
68       artifactDaysToKeep: '{build-artifact-days-to-keep}'
69       artifactNumToKeep: '{build-artifact-num-to-keep}'
70
71     parameters:
72       - project-parameter:
73           project: '{project}'
74       - gerrit-parameter:
75           branch: '{branch}'
76       - os-parameter:
77           os: '{os}'
78       - repo-name-parameter:
79           repo-name: '{repo-stream-part}.{repo-os-part}'
80       - stream-parameter:
81           stream: '{stream}'
82       - string:
83           name: ARCHIVE_ARTIFACTS
84           default: '{archive-artifacts}'
85           description: Artifacts to archive to the logs server.
86
87     scm:
88       - gerrit-trigger-scm:
89           credentials-id: 'jenkins-gerrit-credentials'
90           refspec: '$GERRIT_REFSPEC'
91           choosing-strategy: 'gerrit'
92
93     wrappers:
94       - fdio-infra-wrappers:
95           build-timeout: 120
96
97     triggers:
98       - gerrit-trigger-checkstyle:
99           name: '{project}'
100           branch: '{branch}'
101       - gerrit-trigger-patch-submitted:
102           name: '{project}'
103           branch: '{branch}'
104
105     builders:
106       - config-file-provider:
107           files:
108             - file-id: '.packagecloud'
109               target: '/root'
110       - config-file-provider:
111           files:
112             - file-id: 'packagecloud_api'
113               target: '/root'
114       - shell:
115           !include-raw-escape: include-raw-sweetcomb-checkstyle.sh
116       - shell:
117           !include-raw-escape:
118           - include-raw-sweetcomb-build.sh
119     publishers:
120       - fdio-infra-shiplogs:
121           maven-version: 'mvn33-new'
122       - naginator:
123           rerun-unstable-builds: false
124           max-failed-builds: 1
125           fixed-delay: 90
126
127 - job-template:
128     name: 'sweetcomb-merge-{stream}-{os}'
129
130     project-type: freestyle
131     node: '{os}-us'
132     archive-artifacts: >
133       **/build-root/build-package/*.rpm
134       **/build-root/build-package/*.deb
135     allow-empty: 'true'
136     fingerprint: false
137     only-if-success: true
138     default-excludes: false
139
140     build-discarder:
141       daysToKeep: '{build-days-to-keep}'
142       numToKeep: 100
143       artifactDaysToKeep: '{build-artifact-days-to-keep}'
144       artifactNumToKeep: '{build-artifact-num-to-keep}'
145
146     parameters:
147       - project-parameter:
148           project: '{project}'
149       - gerrit-parameter:
150           branch: '{branch}'
151       - os-parameter:
152           os: '{os}'
153       - stream-parameter:
154           stream: '{stream}'
155       - repo-name-parameter:
156           repo-name: '{repo-stream-part}.{repo-os-part}'
157       - string:
158           name: ARCHIVE_ARTIFACTS
159           default: '{archive-artifacts}'
160           description: Artifacts to archive to the logs server.
161
162     scm:
163       - gerrit-trigger-scm:
164           credentials-id: 'jenkins-gerrit-credentials'
165           refspec: ''
166           choosing-strategy: 'default'
167
168     wrappers:
169       - fdio-infra-wrappers:
170           build-timeout: '{build-timeout}'
171
172     triggers:
173       - gerrit-trigger-patch-merged:
174           name: '{project}'
175           branch: '{branch}'
176
177     builders:
178       - config-file-provider:
179           files:
180             - file-id: '.packagecloud'
181               target: '/root'
182       - config-file-provider:
183           files:
184             - file-id: 'packagecloud_api'
185               target: '/root'
186       - shell:
187           !include-raw-escape: include-raw-sweetcomb-checkstyle.sh
188       - shell:
189           !include-raw-escape:
190           - include-raw-sweetcomb-build.sh
191       - shell:
192           !include-raw-escape:
193           - ../scripts/packagecloud_push.sh
194     publishers:
195       - fdio-infra-shiplogs:
196           maven-version: 'mvn33-new'
197       - naginator:
198           rerun-unstable-builds: false
199           max-failed-builds: 1
200           fixed-delay: 90
201
202 - job-template:
203     name: 'sweetcomb-test-{stream}-ubuntu1604'
204
205     project-type: freestyle
206     node: 'ubuntu1604-us'
207     concurrent: true
208
209     build-discarder:
210       daysToKeep: '{build-days-to-keep}'
211       numToKeep: 100
212       artifactDaysToKeep: '{build-artifact-days-to-keep}'
213       artifactNumToKeep: '{build-artifact-num-to-keep}'
214
215     parameters:
216       - project-parameter:
217           project: '{project}'
218       - gerrit-parameter:
219           branch: '{branch}'
220       - os-parameter:
221           os: 'ubuntu1604'
222       - repo-name-parameter:
223           repo-name: '{repo-stream-part}.ubuntu.xenial.main'
224       - stream-parameter:
225           stream: '{stream}'
226
227     scm:
228       - gerrit-trigger-scm:
229           credentials-id: 'jenkins-gerrit-credentials'
230           refspec: '$GERRIT_REFSPEC'
231           choosing-strategy: 'gerrit'
232
233     wrappers:
234       - fdio-infra-wrappers:
235           build-timeout: 120
236
237     triggers:
238       - gerrit-trigger-patch-submitted:
239           name: '{project}'
240           branch: '{branch}'
241
242     builders:
243       - config-file-provider:
244           files:
245             - file-id: '.packagecloud'
246               target: '/root'
247       - config-file-provider:
248           files:
249             - file-id: 'packagecloud_api'
250               target: '/root'
251       - shell:
252           !include-raw-escape:
253           - include-raw-sweetcomb-build.sh
254           - include-raw-sweetcomb-test.sh
255     publishers:
256       - fdio-infra-shiplogs:
257           maven-version: 'mvn33-new'
258       - naginator:
259           rerun-unstable-builds: false
260           max-failed-builds: 1
261           fixed-delay: 90
262
263 - project:
264     name: sweetcomb-info
265     project-name: sweetcomb
266     jobs:
267       - gerrit-info-yaml-verify
268     build-node: centos7-builder-4c-4g
269     project: sweetcomb
270     branch: master