X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2FuCPE%2Fci_management%2Fcleanup_control.sh;fp=blueprints%2FuCPE%2Fci_management%2Fcleanup_control.sh;h=3f14b0292969abdbd5b1db21db5f520bfc8aaae2;hb=d63c1f66c2bbff6cd07ac5708f9939455b498b6a;hp=0000000000000000000000000000000000000000;hpb=a25e2c6b61cefe449f53a81e1a9f0b39a0a6208c;p=eliot.git diff --git a/blueprints/uCPE/ci_management/cleanup_control.sh b/blueprints/uCPE/ci_management/cleanup_control.sh new file mode 100755 index 0000000..3f14b02 --- /dev/null +++ b/blueprints/uCPE/ci_management/cleanup_control.sh @@ -0,0 +1,42 @@ +#!/bin/bash -ex +############################################################################## +# Copyright (c) 2019 Huawei Tech and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +# constants + +TESTYAML="testk8s-nginx.yaml" + +# start + +source ../src/config_kubeedge > /dev/null 2>&1 +cd +kubectl delete -f $TESTYAML + +exec_edge_master(){ + + sshpass -p ${EDGENODEPASSWORD} \ + scp ${PATH_OF_ELIOTFOLDER}/scripts/ci_management/cleanup_edge.sh \ + ${EDGENODEUSR}@${EDGENODEIP}:$HOME_EDGENODE + + sshpass -p ${EDGENODEPASSWORD} ssh ${EDGENODEUSR}@${EDGENODEIP} \ + source cleanup_edge.sh + + cd $PATH_OF_ELIOTFOLDER/scripts/ci_management + source cleanup_master.sh + + sshpass -p ${EDGENODEPASSWORD} \ + scp ${PATH_OF_ELIOTFOLDER}/scripts/ci_management/cleanup_edge_final.sh \ + ${EDGENODEUSR}@${EDGENODEIP}:$HOME_EDGENODE + + sshpass -p ${EDGENODEPASSWORD} ssh ${EDGENODEUSR}@${EDGENODEIP} \ + source cleanup_edge_final.sh + +} + +exec_edge_master > /dev/null 2>&1