Modify Sweetcomb jobs to archive to the logs server
[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}-{os}'
24
25     project: 'sweetcomb'
26     os:
27       - ubuntu1604:
28           repo-os-part: 'ubuntu.xenial.main'
29       - ubuntu1804:
30           repo-os-part: 'ubuntu.bionic.main'
31       - centos7:
32           repo-os-part: 'centos7'
33     stream:
34       - master:
35           branch: 'master'
36           repo-stream-part: 'master'
37       - '1904':
38           branch: 'stable/1904'
39           repo-stream-part: 'stable.1904'
40       - '1901':
41           branch: 'stable/1901'
42           repo-stream-part: 'stable.1901'
43
44 - project:
45     name: sweetcomb-view
46     views:
47       - project-view
48     project-name: sweetcomb
49
50 - job-template:
51     name: 'sweetcomb-verify-{stream}-{os}'
52
53     project-type: freestyle
54     node: '{os}-us'
55     concurrent: true
56
57     build-discarder:
58       daysToKeep: '{build-days-to-keep}'
59       numToKeep: 100
60       artifactDaysToKeep: '{build-artifact-days-to-keep}'
61       artifactNumToKeep: '{build-artifact-num-to-keep}'
62
63       archive-artifacts: >
64           **/build-root/build-package/*.rpm
65           **/build-root/build-package/*.deb
66       allow-empty: 'true'
67       fingerprint: false
68       only-if-success: true
69       default-excludes: false
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
133     build-discarder:
134       daysToKeep: '{build-days-to-keep}'
135       numToKeep: 100
136       artifactDaysToKeep: '{build-artifact-days-to-keep}'
137       artifactNumToKeep: '{build-artifact-num-to-keep}'
138
139     archive-artifacts: >
140         **/build-root/build-package/*.rpm
141         **/build-root/build-package/*.deb
142     allow-empty: 'true'
143     fingerprint: false
144     only-if-success: true
145     default-excludes: false
146
147     parameters:
148       - project-parameter:
149           project: '{project}'
150       - gerrit-parameter:
151           branch: '{branch}'
152       - os-parameter:
153           os: '{os}'
154       - stream-parameter:
155           stream: '{stream}'
156       - repo-name-parameter:
157           repo-name: '{repo-stream-part}.{repo-os-part}'
158       - string:
159           name: ARCHIVE_ARTIFACTS
160           default: '{archive-artifacts}'
161           description: Artifacts to archive to the logs server.
162
163     scm:
164       - gerrit-trigger-scm:
165           credentials-id: 'jenkins-gerrit-credentials'
166           refspec: ''
167           choosing-strategy: 'default'
168
169     wrappers:
170       - fdio-infra-wrappers:
171           build-timeout: '{build-timeout}'
172
173     triggers:
174       - gerrit-trigger-patch-merged:
175           name: '{project}'
176           branch: '{branch}'
177
178     builders:
179       - config-file-provider:
180           files:
181             - file-id: '.packagecloud'
182               target: '/root'
183       - config-file-provider:
184           files:
185             - file-id: 'packagecloud_api'
186               target: '/root'
187       - shell:
188           !include-raw-escape: include-raw-sweetcomb-checkstyle.sh
189       - shell:
190           !include-raw-escape:
191           - include-raw-sweetcomb-build.sh
192       - shell:
193           !include-raw-escape:
194           - ../scripts/packagecloud_push.sh
195     publishers:
196       - fdio-infra-shiplogs:
197           maven-version: 'mvn33-new'
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}-{os}'
205
206     project-type: freestyle
207     node: '{os}-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     archive-artifacts: >
217     allow-empty: 'true'
218     fingerprint: false
219     only-if-success: true
220     default-excludes: false
221
222     parameters:
223       - project-parameter:
224           project: '{project}'
225       - gerrit-parameter:
226           branch: '{branch}'
227       - os-parameter:
228           os: '{os}'
229       - repo-name-parameter:
230           repo-name: '{repo-stream-part}.{repo-os-part}'
231       - stream-parameter:
232           stream: '{stream}'
233
234     scm:
235       - gerrit-trigger-scm:
236           credentials-id: 'jenkins-gerrit-credentials'
237           refspec: '$GERRIT_REFSPEC'
238           choosing-strategy: 'gerrit'
239
240     wrappers:
241       - fdio-infra-wrappers:
242           build-timeout: 120
243
244     triggers:
245       - gerrit-trigger-patch-submitted:
246           name: '{project}'
247           branch: '{branch}'
248
249     builders:
250       - config-file-provider:
251           files:
252             - file-id: '.packagecloud'
253               target: '/root'
254       - config-file-provider:
255           files:
256             - file-id: 'packagecloud_api'
257               target: '/root'
258       - shell:
259           !include-raw-escape:
260           - include-raw-sweetcomb-build.sh
261           - include-raw-sweetcomb-test.sh
262     publishers:
263       - fdio-infra-shiplogs:
264           maven-version: 'mvn33-new'
265       - naginator:
266           rerun-unstable-builds: false
267           max-failed-builds: 1
268           fixed-delay: 90