Kubeedge cleanup and code optimisation
[eliot.git] / scripts / ci_management / cleanup_control.sh
1 #!/bin/bash -ex
2 ##############################################################################
3 # Copyright (c) 2019 Huawei Tech and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 # constants
12
13 TESTYAML="testk8s-nginx.yaml"
14
15 # start
16
17 source ../src/config_kubeedge
18 cd
19 kubectl delete -f $TESTYAML
20
21 sshpass -p ${EDGENODEPASSWORD} \
22 scp ${PATH_OF_ELIOTFOLDER}/scripts/ci_management/cleanup_edge.sh \
23 ${EDGENODEUSR}@${EDGENODEIP}:$HOME_EDGENODE
24
25 sshpass -p ${EDGENODEPASSWORD} ssh ${EDGENODEUSR}@${EDGENODEIP} \
26 source cleanup_edge.sh
27
28 cd $PATH_OF_ELIOTFOLDER/scripts/ci_management
29 source cleanup_master.sh
30
31 sshpass -p ${EDGENODEPASSWORD} \
32 scp ${PATH_OF_ELIOTFOLDER}/scripts/ci_management/cleanup_edge_final.sh \
33 ${EDGENODEUSR}@${EDGENODEIP}:$HOME_EDGENODE
34
35 sshpass -p ${EDGENODEPASSWORD} ssh ${EDGENODEUSR}@${EDGENODEIP} \
36 source cleanup_edge_final.sh