Modify archive path
[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     parameters:
64       - project-parameter:
65           project: '{project}'
66       - gerrit-parameter:
67           branch: '{branch}'
68       - os-parameter:
69           os: '{os}'
70       - repo-name-parameter:
71           repo-name: '{repo-stream-part}.{repo-os-part}'
72       - stream-parameter:
73           stream: '{stream}'
74
75     scm:
76       - gerrit-trigger-scm:
77           credentials-id: 'jenkins-gerrit-credentials'
78           refspec: '$GERRIT_REFSPEC'
79           choosing-strategy: 'gerrit'
80
81     wrappers:
82       - fdio-infra-wrappers:
83           build-timeout: 120
84
85     triggers:
86       - gerrit-trigger-checkstyle:
87           name: '{project}'
88           branch: '{branch}'
89       - gerrit-trigger-patch-submitted:
90           name: '{project}'
91           branch: '{branch}'
92
93     builders:
94       - config-file-provider:
95           files:
96             - file-id: '.packagecloud'
97               target: '/root'
98       - config-file-provider:
99           files:
100             - file-id: 'packagecloud_api'
101               target: '/root'
102       - shell:
103           !include-raw-escape: include-raw-sweetcomb-checkstyle.sh
104       - shell:
105           !include-raw-escape:
106           - include-raw-sweetcomb-build.sh
107     publishers:
108       - archive:
109           artifacts: >
110             **/build-root/build-package/*.rpm,
111             **/build-root/build-package/*.deb,
112           allow-empty: 'true'
113           fingerprint: false
114           only-if-success: true
115           default-excludes: false
116       - fdio-infra-shiplogs:
117           maven-version: 'mvn33-new'
118       - naginator:
119           rerun-unstable-builds: false
120           max-failed-builds: 1
121           fixed-delay: 90
122
123     publishers:
124       - fdio-infra-shiplogs:
125           maven-version: 'mvn33-new'
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
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       - archive:
198           artifacts: >
199             **/build-root/build-package/*.rpm,
200             **/build-root/build-package/*.deb,
201           allow-empty: 'true'
202           fingerprint: false
203           only-if-success: true
204           default-excludes: false
205       - fdio-infra-shiplogs:
206           maven-version: 'mvn33-new'
207       - naginator:
208           rerun-unstable-builds: false
209           max-failed-builds: 1
210           fixed-delay: 90
211
212 - job-template:
213     name: 'sweetcomb-test-{stream}-{os}'
214
215     project-type: freestyle
216     node: '{os}-us'
217     concurrent: true
218
219     build-discarder:
220       daysToKeep: '{build-days-to-keep}'
221       numToKeep: 100
222       artifactDaysToKeep: '{build-artifact-days-to-keep}'
223       artifactNumToKeep: '{build-artifact-num-to-keep}'
224
225     parameters:
226       - project-parameter:
227           project: '{project}'
228       - gerrit-parameter:
229           branch: '{branch}'
230       - os-parameter:
231           os: '{os}'
232       - repo-name-parameter:
233           repo-name: '{repo-stream-part}.{repo-os-part}'
234       - stream-parameter:
235           stream: '{stream}'
236
237     scm:
238       - gerrit-trigger-scm:
239           credentials-id: 'jenkins-gerrit-credentials'
240           refspec: '$GERRIT_REFSPEC'
241           choosing-strategy: 'gerrit'
242
243     wrappers:
244       - fdio-infra-wrappers:
245           build-timeout: 120
246
247     triggers:
248       - gerrit-trigger-patch-submitted:
249           name: '{project}'
250           branch: '{branch}'
251
252     builders:
253       - config-file-provider:
254           files:
255             - file-id: '.packagecloud'
256               target: '/root'
257       - config-file-provider:
258           files:
259             - file-id: 'packagecloud_api'
260               target: '/root'
261       - shell:
262           !include-raw-escape:
263           - include-raw-sweetcomb-build.sh
264           - include-raw-sweetcomb-test.sh
265     publishers:
266       - archive:
267           allow-empty: 'true'
268           fingerprint: false
269           only-if-success: true
270           default-excludes: false
271       - fdio-infra-shiplogs:
272           maven-version: 'mvn33-new'
273       - naginator:
274           rerun-unstable-builds: false
275           max-failed-builds: 1
276           fixed-delay: 90
277
278     publishers:
279       - fdio-infra-shiplogs:
280           maven-version: 'mvn33-new'