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