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