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