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