mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-21 16:53:23 +00:00
* refactors double quote to prevent globbing and word splitting e2e sh Signed-off-by: afzal442 <afzal442@gmail.com> * refactors e2e_core sh Signed-off-by: afzal442 <afzal442@gmail.com> * refactors cleanup sh Signed-off-by: afzal442 <afzal442@gmail.com> * refactors header-chk sh Signed-off-by: afzal442 <afzal442@gmail.com> * refactors installdef sh Signed-off-by: afzal442 <afzal442@gmail.com>
22 lines
820 B
Bash
22 lines
820 B
Bash
CONTAINER_ID=$(docker exec kind-control-plane crictl ps | grep 'kubevela\s' | grep --regexp '^.............' -o)
|
|
DOCKER_DIR=$(docker exec kind-control-plane crictl inspect --output go-template --template '{{range .info.runtimeSpec.mounts}}{{if (eq .destination "/workspace/data")}}{{.source}}{{end}}{{end}}' "${CONTAINER_ID}")
|
|
echo "${CONTAINER_ID}"
|
|
echo "${DOCKER_DIR}"
|
|
|
|
docker exec kind-control-plane crictl exec "${CONTAINER_ID}" kill -2 1
|
|
|
|
file=$DOCKER_DIR/e2e-profile.out
|
|
echo "$file"
|
|
n=1
|
|
while [ $n -le 60 ];do
|
|
if_exist=$(docker exec kind-control-plane sh -c "test -f $file && echo 'ok'")
|
|
echo "$if_exist"
|
|
if [ -n "$if_exist" ];then
|
|
docker exec kind-control-plane cat "$file" > /tmp/e2e-profile.out
|
|
break
|
|
fi
|
|
echo file not generated yet
|
|
n="$(expr $n + 1)"
|
|
sleep 1
|
|
done
|