blob: 749739a06051b5018e92aa319b3409bc9d37eec9 [file] [log] [blame]
Gary Wu950a3232019-03-26 13:08:29 -07001#!/bin/bash
2#
3# Copyright 2019 Huawei Technologies Co., Ltd.
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
12if [ "$#" -ne 1 ]; then
13 echo "Please specify module name, i.e. $0 robot"
14 exit 1
15fi
16
17module=$1
18deploy=dev-$1
19cd /root/oom/kubernetes
Yang Xuecba22c2019-06-07 14:52:40 -040020echo "Deleting $deploy ..."
Gary Wu950a3232019-03-26 13:08:29 -070021helm delete $deploy --purge
Yang Xuecba22c2019-06-07 14:52:40 -040022echo "Wait for 5 seconds before cleaning up deployment resource ..."
23sleep 5
24echo "Cleaning up deployment resource ..."
Yang Xu85b39092019-04-29 00:56:07 -040025/root/integration/deployment/heat/onap-rke/scripts/cleanup.sh $module
Yang Xuecba22c2019-06-07 14:52:40 -040026echo "Wait for 5 seconds before cleaning up deployment file system ..."
27sleep 5
28echo "Cleaning up deployment file system ..."
Gary Wu950a3232019-03-26 13:08:29 -070029rm -rf /dockerdata-nfs/$deploy
Yang Xuecba22c2019-06-07 14:52:40 -040030echo "Wait for 5 seconds before make $module and make onap ..."
31sleep 5
32echo "making $module and making onap ..."
Gary Wu950a3232019-03-26 13:08:29 -070033make $module
34make onap
Yang Xuecba22c2019-06-07 14:52:40 -040035echo "Wait for 5 seconds before deploying $deploy ..."
36sleep 5
37echo "Deploying $deploy ..."
Gary Wu950a3232019-03-26 13:08:29 -070038helm deploy $deploy local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap