3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2019 The Nordix Foundation. All rights reserved.
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
25 /bin/rm -f ../inventory.ini
26 echo "Info: Preparing for ONAP deployment"
28 # checkout given engine version
29 if [[ "$ENGINE_VERSION" != "master" ]]; then
30 echo "Warning: Checking out $ENGINE_VERSION"
31 git checkout -q $ENGINE_VERSION
34 # checkout given engine refspec
35 if [[ "$ENGINE_REFSPEC" != "master" ]]; then
36 echo "Warning: Checking out engine $ENGINE_REFSPEC"
37 echo "-------------------------------------------------------------------------"
38 git fetch https://gerrit.nordix.org/infra/engine $ENGINE_REFSPEC && git checkout -q FETCH_HEAD
39 echo "-------------------------------------------------------------------------"
42 # update scenario version and refspec in engine/envine/var/sdf.yml
43 if [[ "$DEPLOY_SCENARIO_VERSION" != "master" && "$DEPLOY_SCENARIO_REFSPEC" != "master" ]]; then
44 echo "Warning: Adding $DEPLOY_SCENARIO_VERSION as scenario version and $DEPLOY_SCENARIO_REFSPEC as scenario refspec"
45 cat << EOF > $WORKSPACE/engine/var/sdf.yml
49 src: https://gerrit.nordix.org/infra/swconfig.git
50 version: $DEPLOY_SCENARIO_VERSION
51 refspec: $DEPLOY_SCENARIO_REFSPEC
56 role: scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO
61 echo "Info: Temporary SDF content"
62 echo "-------------------------------------------------------------------------"
63 cat $WORKSPACE/engine/var/sdf.yml
64 echo "-------------------------------------------------------------------------"
67 echo "Info: Starting K8S cluster creation and ONAP deployment"
68 echo "-------------------------------------------------------------------------"
70 ./engine/deploy.sh -c -r $PROVISIONER_TYPE -u $OPENRC_FILE \
71 -s $DEPLOY_SCENARIO -e $HEAT_ENVIRONMENT_FILE
74 /bin/cp $WORKSPACE/.cache/config/inventory.ini ../inventory.ini
75 # vim: set ts=2 sw=2 expandtab: