Release Jobs for ONAP
[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     stream:
26       - 'master':
27           branch: 'master'
28           deploy-scenario: 'onap-sdc-nofeature'
29           k8s-version: '1.15'
30           promote-stack: 'false'
31       - 'frankfurt':
32           branch: 'frankfurt'
33           deploy-scenario: 'onap-sdc-nofeature'
34           k8s-version: '1.15'
35           promote-stack: 'true'
36       - 'elalto':
37           branch: 'elalto'
38           deploy-scenario: 'onap-sdc-nofeature'
39           k8s-version: '1.15'
40           promote-stack: 'true'
41
42     environment-type:
43       - offline:
44           disabled: false
45           execution-mode: offline-deployment
46           openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
47
48     phase:
49       - deploy
50
51
52     type:
53       - cloud:
54           provisioner-type: 'heat'
55           slave-type: 'jumphost'
56           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"
57           idf: "https://gerrit.nordix.org/gitweb?p=infra/provisioner/heat.git;a=blob_plain;f=playbooks/roles/create-stack/files/heat-idf.yaml"
58
59     distro:
60       - ubuntu1804
61
62     cloud:
63       - city:
64           openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
65
66     jobs:
67       - 'onap-release-{distro}-{stream}'
68       - 'onap-package-{distro}-{stream}'
69       - 'onap-promote-{distro}-{stream}'
70
71
72
73 - job-template:
74     name: 'onap-release-{distro}-{stream}'
75
76     project-type: multijob
77
78     disabled: '{obj:disabled}'
79
80     node: 'engine-package-{distro}-fra'
81
82     concurrent: false
83
84     parameters:
85       - string:
86           name: BRANCH
87           default: '{branch}'
88           description: 'Branch the job is created for. DO NOT MODIFY!'
89       - string:
90           name: DISTRO
91           default: '{distro}'
92           description: 'Distribution to provision and configre target nodes with. DO NOT MODIFY!'
93       - string:
94           name: DEPLOY_SCENARIO
95           default: '{deploy-scenario}'
96           description: 'Scenario to test change with. This depends on the branch of the stack.'
97       - string:
98           name: CI_LOOP
99           default: 'release'
100           description: 'CI loop type. DO NOT MODIFY!'
101       - string:
102           name: VERBOSITY
103           default: 'false'
104           description: 'Engine verbosity'
105       - string:
106           name: NORDIX_ENGINE_VERSION
107           default: 'master'
108           description: 'Engine version of engine to package, deploy, test, release'
109       - string:
110           name: STACK_TYPE
111           default: 'onap'
112           description: 'Stack to package, deploy, test, release'
113       - string:
114           name: STACK_VERSION
115           default: '{branch}'
116           description: 'Stack 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: 'onap-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: 'onap-release-offline-deploy-test-{distro}-city-cloud-{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: 'onap-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: 'onap-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: 180
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: 'onap-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: 60
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'