add ccsdk-sli-northbound
[infra/cicd.git] / jjb / cloud-infra / kubernetes-jobs / kubernetes-release-jobs.yaml
1 ---
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
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 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 - project:
21     name: 'kubernetes-release'
22
23     project: 'kubernetes-release'
24
25     stream:
26       - 'master':
27           branch: 'master'
28           deploy-scenario: 'k8-multus-plugins'
29           promote-stack: 'false'
30       - '1_20':
31           branch: '1.20'
32           deploy-scenario: 'k8-multus-plugins'
33           promote-stack: 'true'
34       - '1_19':
35           branch: '1.19'
36           deploy-scenario: 'k8-multus-plugins'
37           promote-stack: 'true'
38       - '1_18':
39           branch: '1.18'
40           deploy-scenario: 'k8-multus-plugins'
41           promote-stack: 'true'
42       - '1_17':
43           branch: '1.17'
44           deploy-scenario: 'k8-multus-plugins'
45           promote-stack: 'true'
46       - '1_16':
47           branch: '1.16'
48           deploy-scenario: 'k8-calico-nofeature'
49           promote-stack: 'true'
50       - '1_15':
51           branch: '1.15'
52           deploy-scenario: 'k8-calico-nofeature'
53           promote-stack: 'true'
54
55     environment-type:
56       - offline:
57           disabled: false
58           execution-mode: offline-deployment
59           openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
60
61     distro:
62       - ubuntu1804
63
64     jobs:
65       - 'kubernetes-release-{distro}-{stream}'
66       - 'kubernetes-package-{distro}-{stream}'
67       - 'kubernetes-promote-{distro}-{stream}'
68
69 - job-template:
70     name: 'kubernetes-release-{distro}-{stream}'
71
72     project-type: multijob
73
74     disabled: '{obj:disabled}'
75
76     node: 'engine-package-{distro}-fra'
77
78     concurrent: false
79
80     parameters:
81       - string:
82           name: BRANCH
83           default: '{branch}'
84           description: 'Branch the job is created for. DO NOT MODIFY!'
85       - string:
86           name: DISTRO
87           default: '{distro}'
88           description: 'Distribution to provision and configre target nodes with. DO NOT MODIFY!'
89       - string:
90           name: DEPLOY_SCENARIO
91           default: '{deploy-scenario}'
92           description: 'Scenario to test change with. This depends on the branch of the stack.'
93       - string:
94           name: CI_LOOP
95           default: 'release'
96           description: 'CI loop type. DO NOT MODIFY!'
97       - string:
98           name: VERBOSITY
99           default: 'false'
100           description: 'Engine verbosity'
101       - string:
102           name: NORDIX_ENGINE_VERSION
103           default: 'master'
104           description: 'Engine version of engine to package, deploy, test, release'
105       - string:
106           name: STACK_TYPE
107           default: 'kubernetes'
108           description: 'Stack to package, deploy, test, release'
109       - string:
110           name: STACK_VERSION
111           default: '{branch}'
112           description: 'Stack version of engine to package, deploy, test, release'
113       - string:
114           name: NORDIX_KUBESPRAY_VERSION
115           default: '{branch}'
116           description: 'Kubespray version of engine to package, deploy, test, release'
117       - string:
118           name: NORDIX_BIFROST_VERSION
119           default: 'master'
120           description: 'Bifrost version of engine to package, deploy, test, release'
121       - string:
122           name: NORDIX_HEAT_VERSION
123           default: 'master'
124           description: 'Heat version of engine to package, deploy, test, release'
125       - string:
126           name: PROMOTE_STACK
127           default: '{promote-stack}'
128           description: 'Heat version of engine to package, deploy, test, release'
129
130     properties:
131       - logrotate
132       # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
133       - throttle:
134           enabled: true
135           max-per-node: 1
136           max-total: 1
137           option: category
138           categories:
139             - engine-verify-package
140
141     wrappers:
142       - build-timeout:
143           timeout: 600
144       - mask-passwords
145       - fix-workspace-permissions
146       - openstack:
147           single-use: True
148
149     triggers:
150       - pollscm:
151           cron: "#H 0,8,16 * * *"
152
153     scm:
154       - git:
155           url: https://gerrit.nordix.org/infra/engine.git
156           branches:
157             - master
158           timeout: 15
159           wipe-workspace: true
160
161     builders:
162       - 'generate-release-metadata-macro'
163       - inject:
164           properties-file: "$WORKSPACE/release.properties"
165       - 'generate-ssh-keypair-macro'
166       - 'wait-pkg-mgr-macro'
167       - multijob:
168           name: Packaging
169           condition: SUCCESSFUL
170           execution-type: PARALLEL
171           projects:
172             - name: 'kubernetes-package-{distro}-{stream}'
173               current-parameters: false
174               git-revision: true
175               node-parameters: true
176               property-file: "$WORKSPACE/release.properties"
177               kill-phase-on: FAILURE
178               abort-all-job: true
179       - multijob:
180           name: Release Test {deploy-scenario}
181           condition: SUCCESSFUL
182           execution-type: PARALLEL
183           projects:
184             - name: 'kubernetes-release-offline-deploy-test-{distro}-baremetal-{stream}'
185               current-parameters: false
186               git-revision: true
187               node-parameters: false
188               property-file: "$WORKSPACE/release.properties"
189               kill-phase-on: FAILURE
190               abort-all-job: true
191       - multijob:
192           name: Promotion
193           condition: SUCCESSFUL
194           execution-type: PARALLEL
195           projects:
196             - name: 'kubernetes-promote-{distro}-{stream}'
197               current-parameters: false
198               git-revision: true
199               node-parameters: true
200               property-file: "$WORKSPACE/release.properties"
201               kill-phase-on: FAILURE
202               abort-all-job: true
203
204 - job-template:
205     name: 'kubernetes-package-{distro}-{stream}'
206
207     disabled: '{obj:disabled}'
208
209     concurrent: false
210
211     parameters:
212       - string:
213           name: EXECUTION_MODE
214           default: 'packaging'
215           description: 'Execution mode to run engine'
216
217     properties:
218       - logrotate
219
220     wrappers:
221       - build-timeout:
222           timeout: 70
223       - credentials-binding:
224           - username-password-separated:
225               credential-id: 'nordix-cicd-arm-credentials'
226               username: NORDIX_ARM_USERNAME
227               password: NORDIX_ARM_TOKEN
228       - mask-passwords
229       - fix-workspace-permissions
230
231     scm:
232       - git:
233           url: https://gerrit.nordix.org/infra/engine.git
234           branches:
235             - master
236           timeout: 15
237           wipe-workspace: true
238
239     builders:
240       - 'package-macro'
241       - 'upload-artifact-macro'
242
243 - job-template:
244     name: 'kubernetes-promote-{distro}-{stream}'
245
246     disabled: '{obj:disabled}'
247
248     concurrent: false
249
250     properties:
251       - logrotate
252
253     wrappers:
254       - build-timeout:
255           timeout: 30
256       - credentials-binding:
257           - username-password-separated:
258               credential-id: 'nordix-cicd-arm-credentials'
259               username: NORDIX_ARM_USERNAME
260               password: NORDIX_ARM_TOKEN
261       - mask-passwords
262       - fix-workspace-permissions
263
264     scm:
265       - git:
266           url: https://gerrit.nordix.org/infra/engine.git
267           branches:
268             - master
269           timeout: 15
270           wipe-workspace: true
271
272     builders:
273       - 'promote-macro'