engine: Move CI to City London Region
[infra/cicd.git] / jjb / engine / onap-periodic-jobs / onap-online-deploy-test-jobs.yaml
1 ---
2 #
3 # ============LICENSE_START=======================================================
4 #  Copyright (C) 2019 Nordix Foundation.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
20
21 #--------------------------------------------------------------------------------------
22 # The jobs declared in this JJB configuration file are used for deploying and testing
23 # ONAP scenario onap-nofeature-noha.
24 #--------------------------------------------------------------------------------------
25
26 - project:
27     name: 'onap-deploy-test-online'
28
29     project: 'infra/engine'
30
31     distro:
32       - ubuntu1804
33
34     deploy-scenario:
35       - k8-calico-onap:
36           deploy-scenario-version: master
37           deploy-scenario-refspec: master
38
39     onap-profile:
40       - sdc
41       - so
42
43     onap-branch:
44       - elalto:
45           onap-version: elalto
46           nordix-branch: master
47           engine-version: master
48           engine-refspec: master
49           disabled: false
50       - master:
51           onap-version: master
52           nordix-branch: master
53           engine-version: master
54           engine-refspec: master
55           disabled: false
56
57     type:
58       - cloud:
59           pod-name: est-cloud
60           provisioner-type: bifrost
61           installer-type: kubespray
62
63     environment-type:
64       - online:
65           execution-mode: online-deployment
66
67     cloud:
68       - city:
69           slave-label: 'engine-jumphost-online-ubuntu1804-lon'
70           openrc-credentials-file: 'est-jenkins-openrcfile-city-london-cicd'
71           daily-trigger: '@midnight'
72
73     ci-loop:
74       - periodic
75
76     job-phase:
77       - deploy:
78           build-timeout: 420
79       - oom-healthcheck:
80           build-timeout: 30
81           test-type: oom-healthcheck
82       - healthcheck:
83           build-timeout: 30
84           test-type: onap-healthcheck
85
86     jobs:
87       - '{deploy-scenario}-{onap-profile}-{environment-type}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
88       - 'onap-{onap-profile}-{environment-type}-{job-phase}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
89
90 - job-template:
91     name: '{deploy-scenario}-{onap-profile}-{environment-type}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
92
93     project-type: multijob
94
95     disabled: '{obj:disabled}'
96
97     concurrent: false
98
99     parameters:
100       - project-parameters:
101           project: '{project}'
102           branch: '{nordix-branch}'
103       - nordix-gerrit-parameters
104       - label:
105           name: SLAVE_LABEL
106           default: '{slave-label}'
107           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
108       - string:
109           name: PROVISIONER_TYPE
110           default: 'heat'
111           description: 'Provisioner to use for provisioning nodes'
112       - string:
113           name: INSTALLER_TYPE
114           default: 'kubespray'
115           description: 'Installer to use for deploying the scenario'
116       - string:
117           name: DEPLOY_SCENARIO
118           default: '{deploy-scenario}'
119           description: 'Scenario to deploy and test'
120       - string:
121           name: DEPLOY_TYPE
122           default: '{type}'
123           description: 'Type of the deployment'
124       - string:
125           name: DISTRO
126           default: '{distro}'
127           description: 'Distribution to use for configuring target nodes (networking etc.)'
128       - string:
129           name: ONAP_VERSION
130           default: '{onap-version}'
131           description: 'ONAP version to deploy'
132       - string:
133           name: ONAP_PROFILE
134           default: '{onap-profile}'
135           description: 'ONAP profile to deploy - could be sdc or so.'
136       - string:
137           name: OPENSTACK_CLOUD_PROVIDER
138           default: '{cloud}'
139           description: 'Name of the cloud where this job is run'
140       - string:
141           name: STACK_NAME
142           default: 'nordix-cicd-{deploy-scenario}-{onap-profile}-{onap-branch}'
143           description: 'Stack to create'
144       - string:
145           name: KEYPAIR_NAME
146           default: 'keypair-nordix-cicd-{deploy-scenario}-{onap-profile}-{onap-branch}'
147           description: 'Keypair to create and use'
148       - string:
149           name: HEAT_ENVIRONMENT_FILENAME
150           default: 'heat-environment-{cloud}-{distro}-{onap-profile}.yaml'
151           description: 'Heat environment file to use'
152       - string:
153           name: EXECUTION_MODE
154           default: '{execution-mode}'
155           description: 'Engine execution mode - could be online-deployment or offline-deployment'
156       - string:
157           name: ENGINE_VERSION
158           default: '{engine-version}'
159           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
160       - string:
161           name: ENGINE_REFSPEC
162           default: '{engine-refspec}'
163           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
164       - string:
165           name: DEPLOY_SCENARIO_VERSION
166           default: '{deploy-scenario-version}'
167           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
168       - string:
169           name: DEPLOY_SCENARIO_REFSPEC
170           default: '{deploy-scenario-refspec}'
171           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
172       - string:
173           name: POD_NAME
174           default: 'none'
175           description: 'Development purposes only! Set to none for disabling test results DB reporting.'
176       - string:
177           name: TEST_TYPE
178           default: 'oom-healthcheck'
179           description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
180       - string:
181           name: NORDIX_ARM_REPO_URL
182           default: 'https://artifactory.nordix.org/artifactory'
183           description: 'URL to Nordix Artifactory'
184       - string:
185           name: NORDIX_HARBOR_REPO_URL
186           default: 'registry.nordix.org'
187           description: 'URL to Nordix Harbor'
188       - string:
189           name: XTESTING_REPO_URL
190           default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
191           description: 'URL to Nordix xtesting-onap repository'
192       - string:
193           name: ENGINE_ANSIBLE_PARAMS
194           default: ''
195           description: 'Extra parameters that can be added when run the play books.'
196
197     properties:
198       - logrotate
199       - build-blocker:
200           use-build-blocker: true
201           blocking-jobs:
202             - 'cloud-infra-verify-engine-.*'
203             - 'cloud-infra-verify-scenario-.*'
204             - 'cloud-infra-periodic-engine-.*'
205             - 'onap-.*'
206             - 'k8-.*'
207             - 'os-.*'
208             - 'nolabs-.*'
209           block-level: 'NODE'
210       - throttle:
211           max-per-node: 1
212           max-total: 1
213           option: project
214
215     wrappers:
216       - mask-passwords
217       - build-timeout:
218           timeout: 630
219       - fix-workspace-permissions
220
221     triggers:
222       - timed: '{daily-trigger}'
223
224     scm:
225       - git-scm:
226           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
227           branch: '{nordix-branch}'
228           refspec: ''
229           wipe_workspace: true
230           clean_before: false
231
232     builders:
233       - description-setter:
234           description: $DEPLOY_SCENARIO | $ONAP_PROFILE
235       - multijob:
236           name: Deploy ONAP using OOM (not activated)
237           condition: ALWAYS
238           projects:
239             - name: 'onap-{onap-profile}-{environment-type}-deploy-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
240               current-parameters: false
241               predefined-parameters: |
242                 DISTRO=$DISTRO
243                 PROVISIONER_TYPE=$PROVISIONER_TYPE
244                 INSTALLER_TYPE=$INSTALLER_TYPE
245                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
246                 ONAP_VERSION=$ONAP_VERSION
247                 ONAP_PROFILE=$ONAP_PROFILE
248                 POD_NAME=$POD_NAME
249                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
250                 STACK_NAME=$STACK_NAME
251                 KEYPAIR_NAME=$KEYPAIR_NAME
252                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
253                 EXECUTION_MODE=$EXECUTION_MODE
254                 ENGINE_VERSION=$ENGINE_VERSION
255                 ENGINE_REFSPEC=$ENGINE_REFSPEC
256                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
257                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
258                 XTESTING_REPO_URL=$XTESTING_REPO_URL
259                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
260               git-revision: true
261               node-parameters: true
262               kill-phase-on: NEVER
263               abort-all-job: false
264       - multijob:
265           name: K8S and OOM Healthcheck using xtesting (not activated)
266           condition: ALWAYS
267           projects:
268             - name: 'onap-{onap-profile}-{environment-type}-oom-healthcheck-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
269               current-parameters: false
270               predefined-parameters: |
271                 DISTRO=$DISTRO
272                 PROVISIONER_TYPE=$PROVISIONER_TYPE
273                 INSTALLER_TYPE=$INSTALLER_TYPE
274                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
275                 ONAP_VERSION=$ONAP_VERSION
276                 ONAP_PROFILE=$ONAP_PROFILE
277                 TEST_TYPE=oom-healthcheck
278                 POD_NAME=$POD_NAME
279                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
280                 STACK_NAME=$STACK_NAME
281                 KEYPAIR_NAME=$KEYPAIR_NAME
282                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
283                 EXECUTION_MODE=$EXECUTION_MODE
284                 ENGINE_VERSION=$ENGINE_VERSION
285                 ENGINE_REFSPEC=$ENGINE_REFSPEC
286                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
287                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
288                 XTESTING_REPO_URL=$XTESTING_REPO_URL
289                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
290               node-parameters: true
291               kill-phase-on: NEVER
292               abort-all-job: false
293       - multijob:
294           name: ONAP Healthcheck using xtesting (not activated)
295           execution-type: SEQUENTIALLY
296           condition: ALWAYS
297           projects:
298             - name: 'onap-{onap-profile}-{environment-type}-healthcheck-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
299               current-parameters: false
300               predefined-parameters: |
301                 SLAVE_LABEL=$SLAVE_LABEL
302                 DISTRO=$DISTRO
303                 PROVISIONER_TYPE=$PROVISIONER_TYPE
304                 INSTALLER_TYPE=$INSTALLER_TYPE
305                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
306                 ONAP_VERSION=$ONAP_VERSION
307                 ONAP_PROFILE=$ONAP_PROFILE
308                 TEST_TYPE=sdc-healthcheck
309                 POD_NAME=$POD_NAME
310                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
311                 STACK_NAME=$STACK_NAME
312                 KEYPAIR_NAME=$KEYPAIR_NAME
313                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
314                 ENGINE_VERSION=$ENGINE_VERSION
315                 EXECUTION_MODE=$EXECUTION_MODE
316                 ENGINE_REFSPEC=$ENGINE_REFSPEC
317                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
318                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
319                 XTESTING_REPO_URL=$XTESTING_REPO_URL
320                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
321               node-parameters: true
322               kill-phase-on: NEVER
323               abort-all-job: false
324             - name: 'onap-{onap-profile}-{environment-type}-healthdist-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
325               current-parameters: false
326               predefined-parameters: |
327                 SLAVE_LABEL=$SLAVE_LABEL
328                 DISTRO=$DISTRO
329                 PROVISIONER_TYPE=$PROVISIONER_TYPE
330                 INSTALLER_TYPE=$INSTALLER_TYPE
331                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
332                 ONAP_VERSION=$ONAP_VERSION
333                 ONAP_PROFILE=$ONAP_PROFILE
334                 TEST_TYPE=onap-healthcheck
335                 POD_NAME=$POD_NAME
336                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
337                 STACK_NAME=$STACK_NAME
338                 KEYPAIR_NAME=$KEYPAIR_NAME
339                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
340                 EXECUTION_MODE=$EXECUTION_MODE
341                 ENGINE_VERSION=$ENGINE_VERSION
342                 ENGINE_REFSPEC=$ENGINE_REFSPEC
343                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
344                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
345                 XTESTING_REPO_URL=$XTESTING_REPO_URL
346                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
347               node-parameters: true
348               kill-phase-on: NEVER
349               abort-all-job: false
350
351 - job-template:
352     name: 'onap-{onap-profile}-{environment-type}-{job-phase}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
353
354     disabled: false
355
356     concurrent: true
357
358     properties:
359       - logrotate
360
361     parameters:
362       - onap-parameter-macro
363
364     wrappers:
365       - mask-passwords
366       - build-timeout:
367           timeout: '{build-timeout}'
368       - fix-workspace-permissions
369       - credentials-binding:
370           - username-password-separated:
371               credential-id: 'nordix-cicd-arm-credentials'
372               username: NORDIX_ARM_USERNAME
373               password: NORDIX_ARM_TOKEN
374           - username-password-separated:
375               credential-id: 'nordix-cicd-harbor-credentials'
376               username: NORDIX_HARBOR_USERNAME
377               password: NORDIX_HARBOR_PASSWORD
378
379     scm:
380       - git-scm:
381           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
382           branch: '{nordix-branch}'
383           refspec: ''
384           wipe_workspace: true
385           clean_before: false
386
387     builders:
388       - description-setter:
389           description: $DEPLOY_SCENARIO | $ONAP_PROFILE
390       - 'onap-{job-phase}-builder-macro'
391
392 # vim: set ts=2 sw=2 expandtab: