Merge "Modify build node"
[ci-management.git] / jjb / tldk / tldk.yaml
1 # Copyright (c) 2017 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 ---
15 - project:
16     name: tldk
17     jobs:
18       - '{project}-verify-{stream}-{os}'
19       - '{project}-merge-{stream}-{os}'
20       - '{project}-verify-image-{stream}-{os}'
21       - 'tldk-csit-verify-func-{stream}-{os}-virl'
22
23     project: 'tldk'
24     os:
25       - ubuntu1604
26     stream:
27       - master:
28           branch: 'master'
29       - dev-next-socket:
30           branch: 'dev-next-socket'
31
32 - project:
33     name: tldk-view
34     view:
35       - project-view
36     project-name: tldk
37
38 - job-template:
39     name: '{project}-verify-{stream}-{os}'
40
41     project-type: freestyle
42     node: '{os}-builder-4c-4g'
43     concurrent: true
44
45     build-discarder:
46       daysToKeep: '{build-days-to-keep}'
47       numToKeep: '{build-num-to-keep}'
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
59     scm:
60       - gerrit-trigger-scm:
61           credentials-id: 'jenkins-gerrit-credentials'
62           refspec: '$GERRIT_REFSPEC'
63           choosing-strategy: 'gerrit'
64
65     wrappers:
66       - fdio-infra-wrappers:
67           build-timeout: '{build-timeout}'
68
69     triggers:
70       - gerrit-trigger-patch-submitted:
71           name: '{project}'
72           branch: '{branch}'
73
74     builders:
75       - shell:
76           !include-raw-escape: gtest-build.sh
77       - inject:
78           properties-file: gtest-env.prop
79       - shell:
80           !include-raw-escape: include-raw-build.sh
81
82     publishers:
83       - lf-infra-publish
84
85 - job-template:
86     name: '{project}-verify-image-{stream}-{os}'
87
88     project-type: freestyle
89     node: '{os}-builder-4c-4g'
90     concurrent: true
91
92     build-discarder:
93       daysToKeep: '{build-days-to-keep}'
94       numToKeep: '{build-num-to-keep}'
95       artifactDaysToKeep: '{build-artifact-days-to-keep}'
96       artifactNumToKeep: '{build-artifact-num-to-keep}'
97
98     parameters:
99       - project-parameter:
100           project: '{project}'
101       - gerrit-parameter:
102           branch: '{branch}'
103       - os-parameter:
104           os: '{os}'
105
106     scm:
107       - gerrit-trigger-scm:
108           credentials-id: 'jenkins-gerrit-credentials'
109           refspec: '$GERRIT_REFSPEC'
110           choosing-strategy: 'gerrit'
111
112     wrappers:
113       - fdio-infra-wrappers:
114           build-timeout: '{build-timeout}'
115
116     triggers:
117       - gerrit:
118           server-name: 'Primary'
119           trigger-on:
120             - comment-added-contains-event:
121                 comment-contains-value: 'verify-images'
122           projects:
123             - project-compare-type: 'ANT'
124               project-pattern: '{project}'
125               branches:
126                 - branch-compare-type: 'ANT'
127                   branch-pattern: '**/{branch}'
128           skip-vote:
129             successful: true
130             failed: true
131             unstable: true
132             notbuilt: true
133
134     builders:
135       - shell:
136           !include-raw-escape: gtest-build.sh
137       - inject:
138           properties-file: gtest-env.prop
139       - shell:
140           !include-raw-escape: include-raw-build.sh
141
142     publishers:
143       - lf-infra-publish
144
145 - job-template:
146     name: '{project}-merge-{stream}-{os}'
147
148     project-type: freestyle
149     node: '{os}-builder-4c-4g'
150     build-discarder:
151       daysToKeep: '{build-days-to-keep}'
152       numToKeep: '{build-num-to-keep}'
153       artifactDaysToKeep: '{build-artifact-days-to-keep}'
154       artifactNumToKeep: '{build-artifact-num-to-keep}'
155
156     parameters:
157       - project-parameter:
158           project: '{project}'
159       - gerrit-parameter:
160           branch: '{branch}'
161       - os-parameter:
162           os: '{os}'
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       - shell:
181           !include-raw-escape: gtest-build.sh
182       - inject:
183           properties-file: gtest-env.prop
184       - shell:
185           !include-raw-escape: include-raw-build.sh
186
187     publishers:
188       - lf-infra-publish
189
190 - job-template:
191     name: 'tldk-csit-verify-func-{stream}-{os}-virl'
192
193     project-type: freestyle
194     node: '{os}-builder-4c-4g'
195     concurrent: true
196     archive-artifacts: >
197       **/csit/report.html
198       **/csit/log.html
199       **/csit/output.xml
200     latest-only: false
201
202     build-discarder:
203       daysToKeep: '{build-days-to-keep}'
204       numToKeep: '{build-num-to-keep}'
205       artifactDaysToKeep: '{build-artifact-days-to-keep}'
206       artifactNumToKeep: '{build-artifact-num-to-keep}'
207
208     parameters:
209       - project-parameter:
210           project: '{project}'
211       - gerrit-parameter:
212           branch: '{branch}'
213       - string:
214           name: ARCHIVE_ARTIFACTS
215           default: '{archive-artifacts}'
216           description: Artifacts to archive to the logs server.
217
218     scm:
219       - gerrit-trigger-scm:
220           credentials-id: 'jenkins-gerrit-credentials'
221           refspec: '$GERRIT_REFSPEC'
222           choosing-strategy: 'gerrit'
223
224     wrappers:
225       - fdio-infra-wrappers:
226           build-timeout: '{build-timeout}'
227
228     triggers:
229       - gerrit-trigger-manually-triggered:
230           name: '{project}'
231           branch: '{branch}'
232           comment-trigger-value: 'verify-tldk-func'
233
234     builders:
235       - shell:
236           !include-raw-escape: include-raw-tldk-csit-functional-virl.sh
237
238     publishers:
239       - robot-report:
240           output-path: ''
241       - lf-infra-publish
242
243 - project:
244     name: tldk-info
245     project-name: tldk
246     jobs:
247       - gerrit-info-yaml-verify
248     build-node: centos7-builder-2c-2g
249     project: tldk
250     branch: master
251
252 - project:
253     name: tldk-sonar
254     project: tldk
255     project-name: tldk
256     mvn-settings: tldk-settings
257     sonarcloud: true
258     sonarcloud-project-organization: '{sonarcloud_project_organization}'
259     sonarcloud-api-token: '{sonarcloud_api_token}'
260     sonarcloud-project-key: '{sonarcloud_project_organization}_{project-name}'
261     branch: master
262     build-node: centos7-docker-2c-2g
263     jobs:
264       - gerrit-maven-sonar