ci: rename scripts/relup/ to scripts/relup-test

This commit is contained in:
Zaiming (Stone) Shi 2022-06-29 08:01:05 +02:00
parent e16fdef6bf
commit 4d4634335c
6 changed files with 23 additions and 8 deletions

View File

@ -0,0 +1,10 @@
# Hot-upgrade test
This collection of scripts is used in CI.
It can also be used to run the test locally, but limited to ubuntu 20.04 so far.
How to:
```
```

View File

@ -116,7 +116,7 @@
!sleep 5 !sleep 5
?SH-PROMPT ?SH-PROMPT
!$PROJ_ROOT/scripts/relup/check-results.sh !$PROJ_ROOT/scripts/relup-test/check-results.sh
!echo ==$$?== !echo ==$$?==
???ALL_IS_WELL ???ALL_IS_WELL
?SH-PROMPT: ?SH-PROMPT:

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
## This script needs the 'lux' command in PATH ## This script needs the 'lux' command in PATH
## it runs the scripts/relup/relup.lux script ## it runs the scripts/relup-test/relup.lux script
set -euo pipefail set -euo pipefail
@ -16,13 +16,18 @@ cd -P -- "$(dirname -- "$0")/../.."
set -x set -x
if [ ! -d '.git' ] && [ -z "${CUR_VSN:-}" ]; then
echo "Unable to resolve current version, because it's not a git repo, and CUR_VSN is not set"
exit 1
fi
case "$old_vsn" in case "$old_vsn" in
e*) e*)
cur_vsn="$(./pkg-vsn.sh emqx-enterprise)" cur_vsn="${CUR_VSN:-$(./pkg-vsn.sh emqx-enterprise)}"
profile='emqx-enterprise' profile='emqx-enterprise'
;; ;;
v*) v*)
cur_vsn="$(./pkg-vsn.sh emqx)" cur_vsn="${CUR_VSN:-$(./pkg-vsn.sh emqx)}"
profile='emqx' profile='emqx'
;; ;;
*) *)
@ -48,7 +53,7 @@ if [ ! -f "$CUR_PKG" ]; then
fi fi
# start two nodes and their friends (webhook server and a bench) in docker # start two nodes and their friends (webhook server and a bench) in docker
./scripts/relup/start-relup-test-cluster.sh 'ubuntu:20.04' "$OLD_PKG" ./scripts/relup-test/start-relup-test-cluster.sh 'ubuntu:20.04' "$OLD_PKG"
# run relup tests # run relup tests
lux \ lux \
@ -61,4 +66,4 @@ lux \
--var NODE1="node1.emqx.io" \ --var NODE1="node1.emqx.io" \
--var NODE2="node2.emqx.io" \ --var NODE2="node2.emqx.io" \
--var BENCH="bench.emqx.io" \ --var BENCH="bench.emqx.io" \
./scripts/relup/relup.lux ./scripts/relup-test/relup.lux

View File

@ -42,7 +42,7 @@ docker run -d -t --name "$NODE1" \
-e EMQX_NODE_COOKIE="$COOKIE" \ -e EMQX_NODE_COOKIE="$COOKIE" \
-p 18083:18083 \ -p 18083:18083 \
-v "$PKG:/emqx.tar.gz" \ -v "$PKG:/emqx.tar.gz" \
-v "$(pwd)/scripts/relup/run-pkg.sh:/run-pkg.sh" \ -v "$(pwd)/scripts/relup-test/run-pkg.sh:/run-pkg.sh" \
"$IMAGE" /run-pkg.sh emqx.tar.gz "$IMAGE" /run-pkg.sh emqx.tar.gz
docker run -d -t --name "$NODE2" \ docker run -d -t --name "$NODE2" \
@ -52,7 +52,7 @@ docker run -d -t --name "$NODE2" \
-e EMQX_NODE_COOKIE="$COOKIE" \ -e EMQX_NODE_COOKIE="$COOKIE" \
-p 18084:18083 \ -p 18084:18083 \
-v "$PKG:/emqx.tar.gz" \ -v "$PKG:/emqx.tar.gz" \
-v "$(pwd)/scripts/relup/run-pkg.sh:/run-pkg.sh" \ -v "$(pwd)/scripts/relup-test/run-pkg.sh:/run-pkg.sh" \
"$IMAGE" /run-pkg.sh emqx.tar.gz "$IMAGE" /run-pkg.sh emqx.tar.gz
docker run -d -t --name "$WEBHOOK" \ docker run -d -t --name "$WEBHOOK" \