Gary Wu | 950a323 | 2019-03-26 13:08:29 -0700 | [diff] [blame] | 1 | #!/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 | |
| 12 | if [ "$#" -ne 1 ]; then |
| 13 | echo "Please specify module name, i.e. $0 robot" |
| 14 | exit 1 |
| 15 | fi |
| 16 | |
| 17 | module=$1 |
| 18 | deploy=dev-$1 |
| 19 | cd /root/oom/kubernetes |
Yang Xu | ecba22c | 2019-06-07 14:52:40 -0400 | [diff] [blame] | 20 | echo "Deleting $deploy ..." |
Gary Wu | 950a323 | 2019-03-26 13:08:29 -0700 | [diff] [blame] | 21 | helm delete $deploy --purge |
Yang Xu | ecba22c | 2019-06-07 14:52:40 -0400 | [diff] [blame] | 22 | echo "Wait for 5 seconds before cleaning up deployment resource ..." |
| 23 | sleep 5 |
| 24 | echo "Cleaning up deployment resource ..." |
andreasgeissler | 64b363b | 2019-11-18 10:21:12 +0100 | [diff] [blame^] | 25 | /root/integration/deployment/heat/onap-rke/scripts/cleanup.sh $module onap dev |
Yang Xu | ecba22c | 2019-06-07 14:52:40 -0400 | [diff] [blame] | 26 | echo "Wait for 5 seconds before cleaning up deployment file system ..." |
| 27 | sleep 5 |
| 28 | echo "Cleaning up deployment file system ..." |
Gary Wu | 950a323 | 2019-03-26 13:08:29 -0700 | [diff] [blame] | 29 | rm -rf /dockerdata-nfs/$deploy |
Yang Xu | ecba22c | 2019-06-07 14:52:40 -0400 | [diff] [blame] | 30 | echo "Wait for 5 seconds before make $module and make onap ..." |
| 31 | sleep 5 |
| 32 | echo "making $module and making onap ..." |
Gary Wu | 950a323 | 2019-03-26 13:08:29 -0700 | [diff] [blame] | 33 | make $module |
andreasgeissler | 64b363b | 2019-11-18 10:21:12 +0100 | [diff] [blame^] | 34 | make onap |
Yang Xu | ecba22c | 2019-06-07 14:52:40 -0400 | [diff] [blame] | 35 | echo "Wait for 5 seconds before deploying $deploy ..." |
| 36 | sleep 5 |
| 37 | echo "Deploying $deploy ..." |
Gary Wu | 950a323 | 2019-03-26 13:08:29 -0700 | [diff] [blame] | 38 | helm deploy $deploy local/onap -f /root/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f /root/integration-override.yaml --namespace onap |