ci: fix relup test
This commit is contained in:
parent
18f3920a73
commit
bcefec1935
|
@ -20,58 +20,46 @@
|
||||||
?ok
|
?ok
|
||||||
?>
|
?>
|
||||||
|
|
||||||
[shell emqx]
|
[shell emqx1]
|
||||||
!cd $PACKAGE_PATH
|
!cd $PACKAGE_PATH
|
||||||
mkdir -p emqx
|
!mkdir -p emqx1
|
||||||
!tar -C emqx -zxf ${PROFILE}-$(echo $old_vsn | sed -r 's/[v|e]//g')-*-ubuntu20.04-amd64.tar.gz
|
!tar -C emqx1 -zxf ${PROFILE}-$(echo $old_vsn | sed -r 's/[v|e]//g')-*-ubuntu20.04-amd64.tar.gz
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
!cd emqx1
|
||||||
!cd emqx
|
!export EMQX_NODE_NAME='emqx1@127.0.0.1'
|
||||||
!sed -i 's|listener.wss.external[ \t]*=.*|listener.wss.external = 8085|g' etc/emqx.conf
|
|
||||||
!sed -i '/emqx_telemetry/d' data/loaded_plugins
|
|
||||||
|
|
||||||
!./bin/emqx start
|
!./bin/emqx start
|
||||||
?EMQX .* is started successfully!
|
?EMQX .* is started successfully!
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
[shell emqx2]
|
[shell emqx2]
|
||||||
!cd $PACKAGE_PATH
|
!cd $PACKAGE_PATH
|
||||||
!cp -f $ONE_MORE_EMQX_PATH/one_more_$(echo $PROFILE | sed 's/-/_/g').sh .
|
!tar -C emqx2 -zxf ${PROFILE}-$(echo $old_vsn | sed -r 's/[v|e]//g')-*-ubuntu20.04-amd64.tar.gz
|
||||||
!./one_more_$(echo $PROFILE | sed 's/-/_/g').sh emqx2
|
!mkdir -p emqx2
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
!cd emqx2
|
!cd emqx2
|
||||||
|
!export EMQX_NODE_NAME='emqx2@127.0.0.1'
|
||||||
!sed -i '/emqx_telemetry/d' data/loaded_plugins
|
!export EMQX_listeners__tcp__default__bind=2883
|
||||||
|
!export EMQX_listeners__ssl__default__bind=9883
|
||||||
|
!export EMQX_listeners__ws__default__bind=9083
|
||||||
|
!export EMQX_listeners__wss__default__bind=9084
|
||||||
!./bin/emqx start
|
!./bin/emqx start
|
||||||
?EMQX .* is started successfully!
|
?EMQX .* is started successfully!
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
!./bin/emqx_ctl cluster join emqx@127.0.0.1
|
!./bin/emqx_ctl cluster join emqx1@127.0.0.1
|
||||||
???Join the cluster successfully.
|
???Join the cluster successfully.
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
!./bin/emqx_ctl cluster status
|
!./bin/emqx_ctl cluster status --json | jq -c .running_nodes
|
||||||
"""???
|
???["emqx1@127.0.0.1","emqx2@127.0.0.1"]
|
||||||
Cluster status: #{running_nodes => ['emqx2@127.0.0.1','emqx@127.0.0.1'],
|
|
||||||
stopped_nodes => []}
|
|
||||||
"""
|
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
!./bin/emqx_ctl resources create 'web_hook' -i 'resource:691c29ba' -c '{"url": "http://127.0.0.1:8080/counter", "method": "POST"}'
|
# TODO find another way to create resource
|
||||||
?created
|
# !./bin/emqx_ctl resources create 'web_hook' -i 'resource:691c29ba' -c '{"url": "http://127.0.0.1:8080/counter", "method": "POST"}'
|
||||||
?SH-PROMPT
|
# ?created
|
||||||
!./bin/emqx_ctl rules create 'SELECT * FROM "t/#"' '[{"name":"data_to_webserver", "params": {"$$resource": "resource:691c29ba"}}]'
|
# ?SH-PROMPT
|
||||||
?created
|
# !./bin/emqx_ctl rules create 'SELECT * FROM "t/#"' '[{"name":"data_to_webserver", "params": {"$$resource": "resource:691c29ba"}}]'
|
||||||
?SH-PROMPT
|
# ?created
|
||||||
|
|
||||||
[shell emqx]
|
|
||||||
!./bin/emqx_ctl resources list
|
|
||||||
?691c29ba
|
|
||||||
?SH-PROMPT
|
|
||||||
!./bin/emqx_ctl rules list
|
|
||||||
?691c29ba
|
|
||||||
?SH-PROMPT
|
|
||||||
|
|
||||||
[shell bench]
|
[shell bench]
|
||||||
!cd $BENCH_PATH
|
!cd $BENCH_PATH
|
||||||
|
@ -79,7 +67,7 @@
|
||||||
!./emqtt_bench pub -c 10 -I 1000 -t t/%i -s 64 -L 300
|
!./emqtt_bench pub -c 10 -I 1000 -t t/%i -s 64 -L 300
|
||||||
???sent
|
???sent
|
||||||
|
|
||||||
[shell emqx]
|
[shell emqx1]
|
||||||
!echo "" > log/emqx.log.1
|
!echo "" > log/emqx.log.1
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
|
@ -114,15 +102,8 @@
|
||||||
?(.*)$VSN
|
?(.*)$VSN
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
!./bin/emqx_ctl cluster status
|
!./bin/emqx_ctl cluster status --json | jq -c .running_nodes
|
||||||
"""???
|
???["emqx1@127.0.0.1","emqx2@127.0.0.1"]
|
||||||
Cluster status: #{running_nodes => ['emqx2@127.0.0.1','emqx@127.0.0.1'],
|
|
||||||
stopped_nodes => []}
|
|
||||||
"""
|
|
||||||
?SH-PROMPT
|
|
||||||
|
|
||||||
!./bin/emqx_ctl plugins list | grep emqx_management
|
|
||||||
?Plugin\(emqx_management.*active=true\)
|
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
[shell emqx2]
|
[shell emqx2]
|
||||||
|
@ -160,15 +141,8 @@
|
||||||
?(.*)$VSN
|
?(.*)$VSN
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
!./bin/emqx_ctl cluster status
|
!./bin/emqx_ctl cluster status --json | jq -c .running_nodes
|
||||||
"""???
|
???["emqx1@127.0.0.1","emqx2@127.0.0.1"]
|
||||||
Cluster status: #{running_nodes => ['emqx2@127.0.0.1','emqx@127.0.0.1'],
|
|
||||||
stopped_nodes => []}
|
|
||||||
"""
|
|
||||||
?SH-PROMPT
|
|
||||||
|
|
||||||
!./bin/emqx_ctl plugins list | grep emqx_management
|
|
||||||
?Plugin\(emqx_management.*active=true\)
|
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
## We don't guarantee not to lose a single message!
|
## We don't guarantee not to lose a single message!
|
||||||
|
@ -179,13 +153,14 @@
|
||||||
!sleep 5
|
!sleep 5
|
||||||
?SH-PROMPT
|
?SH-PROMPT
|
||||||
|
|
||||||
!curl --user admin:public --silent --show-error http://localhost:18083/api/v5/rules | jq --raw-output ".[0].node_metrics[] | select(.node==\"emqx@127.0.0.1\") | .metrics.matched"
|
# TODO adjust rule metrics query API
|
||||||
?300
|
# !curl --user admin:public --silent --show-error http://localhost:18083/api/v5/rules | jq --raw-output ".[0].node_metrics[] | select(.node==\"emqx@127.0.0.1\") | .metrics.matched"
|
||||||
?SH-PROMPT
|
# ?300
|
||||||
|
# ?SH-PROMPT
|
||||||
|
|
||||||
!curl --user admin:public --silent --show-error http://localhost:18083/api/v5/rules | jq --raw-output ".[0].node_metrics[] | select(.node==\"emqx@127.0.0.1\") | .metrics.\"actions.success\""
|
# !curl --user admin:public --silent --show-error http://localhost:18083/api/v5/rules | jq --raw-output ".[0].node_metrics[] | select(.node==\"emqx@127.0.0.1\") | .metrics.\"actions.success\""
|
||||||
?\{"data":(29[0-9])|(300),"code":0\}
|
# ?\{"data":(29[0-9])|(300),"code":0\}
|
||||||
?SH-PROMPT
|
# ?SH-PROMPT
|
||||||
|
|
||||||
[shell emqx2]
|
[shell emqx2]
|
||||||
!cat log/emqx.log.1 |grep -v 691c29ba |tail -n 100
|
!cat log/emqx.log.1 |grep -v 691c29ba |tail -n 100
|
||||||
|
@ -199,7 +174,7 @@
|
||||||
!rm -rf $PACKAGE_PATH/emqx2
|
!rm -rf $PACKAGE_PATH/emqx2
|
||||||
?SH-PROMPT:
|
?SH-PROMPT:
|
||||||
|
|
||||||
[shell emqx]
|
[shell emqx1]
|
||||||
!cat log/emqx.log.1 |grep -v 691c29ba |tail -n 100
|
!cat log/emqx.log.1 |grep -v 691c29ba |tail -n 100
|
||||||
-error
|
-error
|
||||||
??SH-PROMPT:
|
??SH-PROMPT:
|
||||||
|
|
|
@ -48,11 +48,6 @@ jobs:
|
||||||
repository: emqx/paho.mqtt.testing
|
repository: emqx/paho.mqtt.testing
|
||||||
ref: develop-4.0
|
ref: develop-4.0
|
||||||
path: paho.mqtt.testing
|
path: paho.mqtt.testing
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: terry-xiaoyu/one_more_emqx
|
|
||||||
ref: master
|
|
||||||
path: one_more_emqx
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: emqx/emqtt-bench
|
repository: emqx/emqtt-bench
|
||||||
|
@ -70,8 +65,12 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get old vsn
|
- name: Get old vsn
|
||||||
run: echo "OLD_VSNS=$(emqx/scripts/relup-base-vsns.sh ${{ matrix.profile }} | xargs echo -n)" >> $GITHUB_ENV
|
run: |
|
||||||
run: echo "VSN=$(emqx/pkg-vsn.sh ${{ matrix.profile }})" >> $GITHUB_ENV
|
set -x
|
||||||
|
OLD_VSNS="$(emqx/scripts/relup-base-vsns.sh ${{ matrix.profile }} | xargs echo -n)"
|
||||||
|
NOW_VSN=$(emqx/pkg-vsn.sh ${{ matrix.profile }})
|
||||||
|
echo "OLD_VSNS=$OLD_VSNS" >> $GITHUB_ENV
|
||||||
|
echo "NOW_VSN=$NOW_VSN" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: build emqx
|
- name: build emqx
|
||||||
env:
|
env:
|
||||||
|
@ -95,15 +94,15 @@ jobs:
|
||||||
set -e -x -u
|
set -e -x -u
|
||||||
if [ -n "$OLD_VSNS" ]; then
|
if [ -n "$OLD_VSNS" ]; then
|
||||||
mkdir -p packages
|
mkdir -p packages
|
||||||
cp emqx/_packages/${PROFILE}/*.tar.gz packages
|
cp emqx/_packages/${PROFILE}/*.tar.gz packages/
|
||||||
cp emqx/_upgrade_base/*.tar.gz packages
|
cp emqx/_upgrade_base/*.tar.gz packages/
|
||||||
lux \
|
lux \
|
||||||
--case_timeout infinity \
|
--case_timeout infinity \
|
||||||
--var PROFILE=$PROFILE \
|
--var PROFILE=$PROFILE \
|
||||||
--var PACKAGE_PATH=$(pwd)/packages \
|
--var PACKAGE_PATH=$(pwd)/packages \
|
||||||
--var BENCH_PATH=$(pwd)/emqtt-bench \
|
--var BENCH_PATH=$(pwd)/emqtt-bench \
|
||||||
--var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \
|
--var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \
|
||||||
--var VSN="$VSN" \
|
--var VSN="$NOW_VSN" \
|
||||||
--var OLD_VSNS="$OLD_VSNS" \
|
--var OLD_VSNS="$OLD_VSNS" \
|
||||||
emqx/.ci/fvt_tests/relup.lux
|
emqx/.ci/fvt_tests/relup.lux
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue