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