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