Modified the path
[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 > /dev/null 2>&1
18 cd
19 kubectl delete -f $TESTYAML
20
21 exec_edge_master(){
22
23    sshpass -p ${EDGENODEPASSWORD} \
24    scp ${PATH_OF_ELIOTFOLDER}/scripts/ci_management/cleanup_edge.sh \
25    ${EDGENODEUSR}@${EDGENODEIP}:$HOME_EDGENODE
26
27    sshpass -p ${EDGENODEPASSWORD} ssh ${EDGENODEUSR}@${EDGENODEIP} \
28    source cleanup_edge.sh
29
30    cd $PATH_OF_ELIOTFOLDER/scripts/ci_management
31    source cleanup_master.sh
32
33    sshpass -p ${EDGENODEPASSWORD} \
34    scp ${PATH_OF_ELIOTFOLDER}/scripts/ci_management/cleanup_edge_final.sh \
35    ${EDGENODEUSR}@${EDGENODEIP}:$HOME_EDGENODE
36
37    sshpass -p ${EDGENODEPASSWORD} ssh ${EDGENODEUSR}@${EDGENODEIP} \
38    source cleanup_edge_final.sh
39
40 }
41
42 exec_edge_master > /dev/null 2>&1