Use separate job template for onap-healthcheck jobs
[infra/cicd.git] / jjb / cloud-infra / onap-macros.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 # macros used by all job types
22 - parameter:
23     name: 'onap-parameter-macro'
24     parameters:
25       - project-parameters:
26           project: '{project}'
27           branch: '{nordix-branch}'
28       - nordix-gerrit-parameters
29       - label:
30           name: SLAVE_LABEL
31           default: '{slave-label}'
32           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
33       - string:
34           name: DISTRO
35           default: '{distro}'
36           description: 'Distribution to use for configuring target nodes (networking etc.)'
37       - string:
38           name: PROVISIONER_TYPE
39           default: '{provisioner-type}'
40           description: 'Provisioner to use for provisioning nodes'
41       - string:
42           name: INSTALLER_TYPE
43           default: '{installer-type}'
44           description: 'Installer to use for deploying the scenario'
45       - string:
46           name: DEPLOY_SCENARIO
47           default: '{deploy-scenario}'
48           description: 'Scenario to deploy and test'
49       - string:
50           name: DEPLOY_TYPE
51           default: '{type}'
52           description: 'Type of the deployment'
53       - string:
54           name: HEAT_ENVIRONMENT_FILE
55           default: "file://$WORKSPACE/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/heat-environment-full.yaml"
56           description: 'Type of the deployment'
57       - string:
58           name: ONAP_VERSION
59           default: '{onap-version}'
60           description: 'ONAP version to deploy'
61       - string:
62           name: ONAP_FLAVOR
63           default: 'full'
64           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
65       - string:
66           name: TEST_TYPE
67           default: 'oom-healthcheck'
68           description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
69       - string:
70           name: ENGINE_VERSION
71           default: '{engine-version}'
72           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
73       - string:
74           name: ENGINE_REFSPEC
75           default: '{engine-refspec}'
76           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
77       - string:
78           name: DEPLOY_SCENARIO_VERSION
79           default: '{deploy-scenario-version}'
80           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
81       - string:
82           name: DEPLOY_SCENARIO_REFSPEC
83           default: '{deploy-scenario-refspec}'
84           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
85       - string:
86           name: XTESTING_REPO_URL
87           default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
88           description: 'URL to Nordix xtesting-onap repository'
89       - string:
90           name: ENGINE_ANSIBLE_PARAMS
91           default: ''
92           description: 'Extra parameters that can be added when run the play books.'
93       - string:
94           name: CLEANUP
95           default: 'true'
96           description: 'Cleanup leftovers of the previous run'
97 - builder:
98     name: 'onap-deploy-macro'
99     builders:
100       - shell:
101           !include-raw: ./wait-for-pkg-manager.sh
102       - shell:
103           !include-raw: ./onap-deploy.sh
104
105 - builder:
106     name: 'oom-healthcheck-macro'
107     builders:
108       - shell:
109           !include-raw: ./oom-healthcheck.sh
110
111 - builder:
112     name: 'onap-healthcheck-macro'
113     builders:
114       - shell:
115           !include-raw: ./onap-healthcheck.sh
116
117 - builder:
118     name: 'promote-onap-macro'
119     builders:
120       - shell:
121           !include-raw: ./promote-onap.sh
122
123 - builder:
124     name: 'delete-stack-macro'
125     builders:
126       - shell:
127           !include-raw: ./delete-stack.sh
128
129 # vim: set ts=2 sw=2 expandtab: