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