engine: Add promotion job for ONAP profile jobs
[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: 'city-jumphost-ubuntu1804'
70           openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-onap'
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       - promote:
86           build-timeout: 240
87
88     jobs:
89       - '{deploy-scenario}-{onap-profile}-{environment-type}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
90       - 'onap-{onap-profile}-{environment-type}-{job-phase}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
91
92 - job-template:
93     name: '{deploy-scenario}-{onap-profile}-{environment-type}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
94
95     project-type: multijob
96
97     disabled: '{obj:disabled}'
98
99     concurrent: false
100
101     parameters:
102       - project-parameters:
103           project: '{project}'
104           branch: '{nordix-branch}'
105       - nordix-gerrit-parameters
106       - label:
107           name: SLAVE_LABEL
108           default: '{slave-label}'
109           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
110       - string:
111           name: PROVISIONER_TYPE
112           default: 'heat'
113           description: 'Provisioner to use for provisioning nodes'
114       - string:
115           name: INSTALLER_TYPE
116           default: 'kubespray'
117           description: 'Installer to use for deploying the scenario'
118       - string:
119           name: DEPLOY_SCENARIO
120           default: '{deploy-scenario}'
121           description: 'Scenario to deploy and test'
122       - string:
123           name: DEPLOY_TYPE
124           default: '{type}'
125           description: 'Type of the deployment'
126       - string:
127           name: DISTRO
128           default: '{distro}'
129           description: 'Distribution to use for configuring target nodes (networking etc.)'
130       - string:
131           name: ONAP_VERSION
132           default: '{onap-version}'
133           description: 'ONAP version to deploy'
134       - string:
135           name: ONAP_PROFILE
136           default: '{onap-profile}'
137           description: 'ONAP profile to deploy - could be sdc or so.'
138       - string:
139           name: OPENSTACK_CLOUD_PROVIDER
140           default: '{cloud}'
141           description: 'Name of the cloud where this job is run'
142       - string:
143           name: STACK_NAME
144           default: 'nordix-cicd-{deploy-scenario}-{onap-profile}-{onap-branch}'
145           description: 'Stack to create'
146       - string:
147           name: KEYPAIR_NAME
148           default: 'keypair-nordix-cicd-{deploy-scenario}-{onap-profile}-{onap-branch}'
149           description: 'Keypair to create and use'
150       - string:
151           name: HEAT_ENVIRONMENT_FILENAME
152           default: 'heat-environment-{cloud}-{distro}-{onap-profile}.yaml'
153           description: 'Heat environment file to use'
154       - string:
155           name: EXECUTION_MODE
156           default: '{execution-mode}'
157           description: 'Engine execution mode - could be online-deployment or offline-deployment'
158       - string:
159           name: ENGINE_VERSION
160           default: '{engine-version}'
161           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
162       - string:
163           name: ENGINE_REFSPEC
164           default: '{engine-refspec}'
165           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
166       - string:
167           name: DEPLOY_SCENARIO_VERSION
168           default: '{deploy-scenario-version}'
169           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
170       - string:
171           name: DEPLOY_SCENARIO_REFSPEC
172           default: '{deploy-scenario-refspec}'
173           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
174       - string:
175           name: POD_NAME
176           default: 'none'
177           description: 'Development purposes only! Set to none for disabling test results DB reporting.'
178       - string:
179           name: TEST_TYPE
180           default: 'oom-healthcheck'
181           description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
182       - string:
183           name: NORDIX_ARM_REPO_URL
184           default: 'https://artifactory.nordix.org/artifactory'
185           description: 'URL to Nordix Artifactory'
186       - string:
187           name: NORDIX_HARBOR_REPO_URL
188           default: 'registry.nordix.org'
189           description: 'URL to Nordix Harbor'
190       - string:
191           name: XTESTING_REPO_URL
192           default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
193           description: 'URL to Nordix xtesting-onap repository'
194       - string:
195           name: ENGINE_ANSIBLE_PARAMS
196           default: ''
197           description: 'Extra parameters that can be added when run the play books.'
198
199     properties:
200       - logrotate
201       - build-blocker:
202           use-build-blocker: true
203           blocking-jobs:
204             - 'cloud-infra-verify-engine-.*'
205             - 'cloud-infra-verify-scenario-.*'
206             - 'cloud-infra-periodic-engine-.*'
207             - 'onap-.*'
208             - 'k8-.*'
209             - 'os-.*'
210             - 'nolabs-.*'
211           block-level: 'NODE'
212       - throttle:
213           max-per-node: 1
214           max-total: 1
215           option: project
216
217     wrappers:
218       - mask-passwords
219       - build-timeout:
220           timeout: 630
221       - fix-workspace-permissions
222
223     triggers:
224       - timed: '{daily-trigger}'
225
226     scm:
227       - git-scm:
228           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
229           branch: '{nordix-branch}'
230           refspec: ''
231           wipe_workspace: true
232           clean_before: false
233
234     builders:
235       - description-setter:
236           description: $DEPLOY_SCENARIO | $ONAP_PROFILE
237       - multijob:
238           name: Deploy ONAP using OOM (not activated)
239           condition: ALWAYS
240           projects:
241             - name: 'onap-{onap-profile}-{environment-type}-deploy-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
242               current-parameters: false
243               predefined-parameters: |
244                 DISTRO=$DISTRO
245                 PROVISIONER_TYPE=$PROVISIONER_TYPE
246                 INSTALLER_TYPE=$INSTALLER_TYPE
247                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
248                 ONAP_VERSION=$ONAP_VERSION
249                 ONAP_PROFILE=$ONAP_PROFILE
250                 POD_NAME=$POD_NAME
251                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
252                 STACK_NAME=$STACK_NAME
253                 KEYPAIR_NAME=$KEYPAIR_NAME
254                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
255                 EXECUTION_MODE=$EXECUTION_MODE
256                 ENGINE_VERSION=$ENGINE_VERSION
257                 ENGINE_REFSPEC=$ENGINE_REFSPEC
258                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
259                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
260                 XTESTING_REPO_URL=$XTESTING_REPO_URL
261                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
262               git-revision: true
263               node-parameters: true
264               kill-phase-on: NEVER
265               abort-all-job: false
266       - multijob:
267           name: K8S and OOM Healthcheck using xtesting (not activated)
268           condition: ALWAYS
269           projects:
270             - name: 'onap-{onap-profile}-{environment-type}-oom-healthcheck-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
271               current-parameters: false
272               predefined-parameters: |
273                 DISTRO=$DISTRO
274                 PROVISIONER_TYPE=$PROVISIONER_TYPE
275                 INSTALLER_TYPE=$INSTALLER_TYPE
276                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
277                 ONAP_VERSION=$ONAP_VERSION
278                 ONAP_PROFILE=$ONAP_PROFILE
279                 TEST_TYPE=oom-healthcheck
280                 POD_NAME=$POD_NAME
281                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
282                 STACK_NAME=$STACK_NAME
283                 KEYPAIR_NAME=$KEYPAIR_NAME
284                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
285                 EXECUTION_MODE=$EXECUTION_MODE
286                 ENGINE_VERSION=$ENGINE_VERSION
287                 ENGINE_REFSPEC=$ENGINE_REFSPEC
288                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
289                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
290                 XTESTING_REPO_URL=$XTESTING_REPO_URL
291                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
292               node-parameters: true
293               kill-phase-on: NEVER
294               abort-all-job: false
295       - multijob:
296           name: ONAP Healthcheck using xtesting (not activated)
297           execution-type: SEQUENTIALLY
298           condition: ALWAYS
299           projects:
300             - name: 'onap-{onap-profile}-{environment-type}-healthcheck-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
301               current-parameters: false
302               predefined-parameters: |
303                 SLAVE_LABEL=$SLAVE_LABEL
304                 DISTRO=$DISTRO
305                 PROVISIONER_TYPE=$PROVISIONER_TYPE
306                 INSTALLER_TYPE=$INSTALLER_TYPE
307                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
308                 ONAP_VERSION=$ONAP_VERSION
309                 ONAP_PROFILE=$ONAP_PROFILE
310                 TEST_TYPE=sdc-healthcheck
311                 POD_NAME=$POD_NAME
312                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
313                 STACK_NAME=$STACK_NAME
314                 KEYPAIR_NAME=$KEYPAIR_NAME
315                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
316                 ENGINE_VERSION=$ENGINE_VERSION
317                 EXECUTION_MODE=$EXECUTION_MODE
318                 ENGINE_REFSPEC=$ENGINE_REFSPEC
319                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
320                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
321                 XTESTING_REPO_URL=$XTESTING_REPO_URL
322                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
323               node-parameters: true
324               kill-phase-on: NEVER
325               abort-all-job: false
326             - name: 'onap-{onap-profile}-{environment-type}-healthdist-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
327               current-parameters: false
328               predefined-parameters: |
329                 SLAVE_LABEL=$SLAVE_LABEL
330                 DISTRO=$DISTRO
331                 PROVISIONER_TYPE=$PROVISIONER_TYPE
332                 INSTALLER_TYPE=$INSTALLER_TYPE
333                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
334                 ONAP_VERSION=$ONAP_VERSION
335                 ONAP_PROFILE=$ONAP_PROFILE
336                 TEST_TYPE=onap-healthcheck
337                 POD_NAME=$POD_NAME
338                 OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
339                 STACK_NAME=$STACK_NAME
340                 KEYPAIR_NAME=$KEYPAIR_NAME
341                 HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
342                 EXECUTION_MODE=$EXECUTION_MODE
343                 ENGINE_VERSION=$ENGINE_VERSION
344                 ENGINE_REFSPEC=$ENGINE_REFSPEC
345                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
346                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
347                 XTESTING_REPO_URL=$XTESTING_REPO_URL
348                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
349               node-parameters: true
350               kill-phase-on: NEVER
351               abort-all-job: false
352       - multijob:
353           name: Promote ONAP (not activated)
354           condition: ALWAYS
355           projects:
356             - name: 'onap-{onap-profile}-{environment-type}-promote-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
357               current-parameters: false
358               predefined-parameters: |
359                 SLAVE_LABEL=$SLAVE_LABEL
360                 DISTRO=$DISTRO
361                 PROVISIONER_TYPE=$PROVISIONER_TYPE
362                 INSTALLER_TYPE=$INSTALLER_TYPE
363                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
364                 ONAP_VERSION=$ONAP_VERSION
365                 ONAP_PROFILE=$ONAP_PROFILE
366                 POD_NAME=$POD_NAME
367                 EXECUTION_MODE=$EXECUTION_MODE
368                 ENGINE_VERSION=$ENGINE_VERSION
369                 ENGINE_REFSPEC=$ENGINE_REFSPEC
370                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
371                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
372                 XTESTING_REPO_URL=$XTESTING_REPO_URL
373                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
374               node-parameters: true
375               kill-phase-on: NEVER
376               abort-all-job: false
377
378 - job-template:
379     name: 'onap-{onap-profile}-{environment-type}-{job-phase}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
380
381     disabled: false
382
383     concurrent: true
384
385     properties:
386       - logrotate
387
388     parameters:
389       - onap-parameter-macro
390
391     wrappers:
392       - mask-passwords
393       - build-timeout:
394           timeout: '{build-timeout}'
395       - fix-workspace-permissions
396       - credentials-binding:
397           - username-password-separated:
398               credential-id: 'nordix-cicd-arm-credentials'
399               username: NORDIX_ARM_USERNAME
400               password: NORDIX_ARM_TOKEN
401           - username-password-separated:
402               credential-id: 'nordix-cicd-harbor-credentials'
403               username: NORDIX_HARBOR_USERNAME
404               password: NORDIX_HARBOR_PASSWORD
405
406     scm:
407       - git-scm:
408           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
409           branch: '{nordix-branch}'
410           refspec: ''
411           wipe_workspace: true
412           clean_before: false
413
414     builders:
415       - description-setter:
416           description: $DEPLOY_SCENARIO | $ONAP_PROFILE
417       - 'onap-{job-phase}-builder-macro'
418
419 # vim: set ts=2 sw=2 expandtab: