Set settings to hicn-settings.
[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
24     project: 'sweetcomb'
25     os:
26       - ubuntu1604:
27           repo-os-part: 'ubuntu.xenial.main'
28       - centos7:
29           repo-os-part: 'centos7'
30     stream:
31       - master:
32           branch: 'master'
33           repo-stream-part: 'master'
34       - '1901':
35           branch: 'stable/1901'
36           repo-stream-part: 'stable.1901'
37
38 - job-template:
39     name: 'sweetcomb-verify-{stream}-{os}'
40
41     project-type: freestyle
42     node: '{os}-us'
43     concurrent: true
44
45     build-discarder:
46       daysToKeep: '{build-days-to-keep}'
47       numToKeep: 100
48       artifactDaysToKeep: '{build-artifact-days-to-keep}'
49       artifactNumToKeep: '{build-artifact-num-to-keep}'
50
51     parameters:
52       - project-parameter:
53           project: '{project}'
54       - gerrit-parameter:
55           branch: '{branch}'
56       - os-parameter:
57           os: '{os}'
58       - repo-name-parameter:
59           repo-name: '{repo-stream-part}.{repo-os-part}'
60       - stream-parameter:
61           stream: '{stream}'
62
63     scm:
64       - gerrit-trigger-scm:
65           credentials-id: 'jenkins-gerrit-credentials'
66           refspec: '$GERRIT_REFSPEC'
67           choosing-strategy: 'gerrit'
68
69     wrappers:
70       - fdio-infra-wrappers:
71           build-timeout: 120
72
73     triggers:
74       - gerrit-trigger-patch-submitted:
75           name: '{project}'
76           branch: '{branch}'
77
78     publishers:
79       - fdio-infra-shiplogs:
80           maven-version: 'mvn33-new'
81
82 - job-template:
83     name: 'sweetcomb-merge-{stream}-{os}'
84
85     project-type: freestyle
86     node: '{os}-us'
87
88     build-discarder:
89       daysToKeep: '{build-days-to-keep}'
90       numToKeep: 100
91       artifactDaysToKeep: '{build-artifact-days-to-keep}'
92       artifactNumToKeep: '{build-artifact-num-to-keep}'
93
94     parameters:
95       - project-parameter:
96           project: '{project}'
97       - gerrit-parameter:
98           branch: '{branch}'
99       - os-parameter:
100           os: '{os}'
101       - stream-parameter:
102           stream: '{stream}'
103       - repo-name-parameter:
104           repo-name: '{repo-stream-part}.{repo-os-part}'
105
106     scm:
107       - gerrit-trigger-scm:
108           credentials-id: 'jenkins-gerrit-credentials'
109           refspec: ''
110           choosing-strategy: 'default'
111
112     wrappers:
113       - fdio-infra-wrappers:
114           build-timeout: '{build-timeout}'
115
116     triggers:
117       - gerrit-trigger-patch-merged:
118           name: '{project}'
119           branch: '{branch}'
120
121     builders:
122       - config-file-provider:
123           files:
124             - file-id: '.packagecloud'
125               target: '/root'
126       - config-file-provider:
127           files:
128             - file-id: 'packagecloud_api'
129               target: '/root'
130       - shell:
131           !include-raw-escape:
132           - include-raw-sweetcomb-build.sh
133       - shell:
134           !include-raw-escape:
135           - ../scripts/packagecloud_push.sh
136     publishers:
137       - archive:
138           artifacts: >
139             **/build-root/*.rpm,
140             **/build-root/*.deb,
141           allow-empty: 'true'
142           fingerprint: false
143           only-if-success: true
144           default-excludes: false
145       - fdio-infra-shiplogs:
146           maven-version: 'mvn33-new'
147       - naginator:
148           rerun-unstable-builds: false
149           max-failed-builds: 1
150           fixed-delay: 90
151