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