engine: Create release jobs for ONAP profiles
[infra/cicd.git] / jjb / engine / onap-periodic-jobs / onap-online-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-online'
22
23     project: 'onap-release-online'
24
25     environment-type:
26       - online:
27           disabled: true
28           execution-mode: online-deployment
29
30     onap-branch:
31       - elalto:
32           onap-version: elalto
33       - master:
34           onap-version: master
35
36     onap-profile:
37       - sdc
38       - so
39
40     distro:
41       - ubuntu1804
42
43     phase:
44       - package
45       - promote
46
47     cloud:
48       - city:
49           openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
50
51     jobs:
52       - 'onap-{onap-profile}-periodic-release-{environment-type}-{distro}-{onap-branch}'
53       - 'onap-{onap-profile}-periodic-package-{distro}-{onap-branch}'
54       - 'onap-{onap-profile}-periodic-promote-{distro}-{onap-branch}'
55
56 - job-template:
57     name: 'onap-{onap-profile}-periodic-release-{environment-type}-{distro}-{onap-branch}'
58
59     project-type: multijob
60
61     disabled: '{obj:disabled}'
62
63     concurrent: false
64
65     parameters:
66       - string:
67           name: EXECUTION_MODE
68           default: '{execution-mode}'
69           description: 'Engine execution mode - online-deployment or offline-deployment - default is online-deployment'
70       - string:
71           name: DISTRO
72           default: '{distro}'
73           description: 'Distribution to use for configuring target nodes (networking etc.)'
74       - string:
75           name: INSTALLER_TYPE
76           default: 'kubespray'
77           description: 'Installer type to use'
78       - string:
79           name: DEPLOY_SCENARIO
80           default: 'k8-calico-onap'
81           description: 'Scenario to deploy and test'
82       - string:
83           name: ONAP_PROFILE
84           default: '{onap-profile}'
85           description: 'ONAP Profile to deploy and test'
86       - string:
87           name: VERBOSITY
88           default: 'true'
89           description: 'Verbosity setting for the engine - true or false - default is false'
90       - string:
91           name: ARTIFACTS_TO_UPLOAD
92           default: "onap-{onap-profile}-installer-ubuntu1804.bsx offline-package.tgz"
93           description: 'Artifacts to upload'
94       - string:
95           name: ARTIFACT_TO_DOWNLOAD
96           default: "onap-{onap-profile}-installer-ubuntu1804.bsx"
97           description: 'Artifact to download'
98       - string:
99           name: NORDIX_ARM_PUBLIC_IP
100           default: '91.106.198.25'
101           description: 'Public IP of Nordix Artifactory. Offline deployments can not resolve domain name'
102       - string:
103           name: NORDIX_ARM_HTTPS_URL
104           default: 'https://artifactory.nordix.org/artifactory'
105           description: 'URL to Nordix Artifactory'
106       - string:
107           name: NORDIX_ARM_REPO
108           default: 'nordix-onap'
109           description: 'Name of the repository to upload and download artifact to/from. Depends on the stack'
110       - string:
111           name: CI_LOOP
112           default: 'periodic'
113           description: 'CI loop type'
114       - label:
115           name: SLAVE_LABEL
116           default: 'engine-build-ubuntu1804'
117           description: 'Slave label to schedule this job on.'
118
119     properties:
120       - logrotate
121
122     wrappers:
123       - build-timeout:
124           timeout: 600
125       - mask-passwords
126       - fix-workspace-permissions
127
128     triggers:
129       - pollscm:
130           cron: "H 0,8,16 * * *"
131
132     scm:
133       - git:
134           url: https://gerrit.nordix.org/infra/engine.git
135           branches:
136             - master
137           timeout: 15
138           wipe-workspace: true
139
140     builders:
141       - 'generate-ssh-keypair-macro'
142       - 'generate-build-metadata-macro'
143       - 'wait-pkg-mgr-macro'
144       - multijob:
145           name: package
146           condition: SUCCESSFUL
147           execution-type: PARALLEL
148           projects:
149             - name: 'onap-{onap-profile}-periodic-package-{distro}-{onap-branch}'
150               current-parameters: true
151               git-revision: true
152               node-parameters: true
153               property-file: "$WORKSPACE/build.properties"
154               kill-phase-on: FAILURE
155               abort-all-job: true
156       - multijob:
157           name: release test k8-calico-onap {onap-profile}
158           condition: SUCCESSFUL
159           execution-type: PARALLEL
160           projects:
161             - name: 'k8-calico-onap-{onap-profile}-online-ubuntu1804-city-cloud-periodic-{onap-branch}'
162               current-parameters: false
163               git-revision: false
164               node-parameters: false
165               property-file: "$WORKSPACE/build.properties"
166               predefined-parameters: |
167                 EXECUTION_MODE=$EXECUTION_MODE
168                 NORDIX_ARM_PUBLIC_IP=$NORDIX_ARM_PUBLIC_IP
169                 ARTIFACT_TO_DOWNLOAD=$ARTIFACT_TO_DOWNLOAD
170                 VERBOSITY=$VERBOSITY
171               kill-phase-on: FAILURE
172               abort-all-job: true
173       - multijob:
174           name: promotion
175           condition: SUCCESSFUL
176           execution-type: PARALLEL
177           projects:
178             - name: 'onap-{onap-profile}-periodic-promote-{distro}-{onap-branch}'
179               current-parameters: true
180               git-revision: true
181               node-parameters: true
182               property-file: "$WORKSPACE/build.properties"
183               kill-phase-on: FAILURE
184               abort-all-job: true
185
186 - job-template:
187     name: 'onap-{onap-profile}-periodic-package-{distro}-{onap-branch}'
188
189     disabled: '{obj:disabled}'
190
191     concurrent: false
192
193     properties:
194       - logrotate
195
196     wrappers:
197       - build-timeout:
198           timeout: 70
199       - credentials-binding:
200           - username-password-separated:
201               credential-id: 'nordix-cicd-arm-credentials'
202               username: NORDIX_ARM_USERNAME
203               password: NORDIX_ARM_TOKEN
204       - mask-passwords
205       - fix-workspace-permissions
206
207     scm:
208       - git:
209           url: https://gerrit.nordix.org/infra/engine.git
210           branches:
211             - master
212           timeout: 15
213           wipe-workspace: true
214
215     builders:
216       - 'onap-package-builder-macro'
217
218 - job-template:
219     name: 'onap-{onap-profile}-periodic-promote-{distro}-{onap-branch}'
220
221     disabled: '{obj:disabled}'
222
223     concurrent: false
224
225     properties:
226       - logrotate
227
228     wrappers:
229       - build-timeout:
230           timeout: 30
231       - credentials-binding:
232           - username-password-separated:
233               credential-id: 'nordix-cicd-arm-credentials'
234               username: NORDIX_ARM_USERNAME
235               password: NORDIX_ARM_TOKEN
236       - mask-passwords
237       - fix-workspace-permissions
238
239     scm:
240       - git:
241           url: https://gerrit.nordix.org/infra/engine.git
242           branches:
243             - master
244           timeout: 15
245           wipe-workspace: true
246
247     builders:
248       - 'onap-promote-builder-macro'