Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update master #3

Merged
merged 221 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
3e3fdbd
添加分组发布ci test
liu-657667 Nov 8, 2023
de8c91e
add log
liu-657667 Nov 8, 2023
91aae3e
添加测试分组发布
liu-657667 Nov 9, 2023
74ba3fc
添加测试分组发布
liu-657667 Nov 9, 2023
642eb6f
添加测试分组发布
liu-657667 Nov 9, 2023
3e4df32
添加测试分组发布
liu-657667 Nov 9, 2023
00414fb
修改分组发布拉起pod数量为2,3个会资源不足
liu-657667 Nov 9, 2023
b5082f6
Merge branch 'master' into feat.ci-test
liu-657667 Nov 10, 2023
9d05348
update docs
Nov 15, 2023
5b1ae85
update docs
Nov 15, 2023
5a8aed0
add ehcache samples
lvjing2 Nov 15, 2023
3952cff
分组发布
liu-657667 Nov 16, 2023
5a19a9b
Merge branch 'master' into feat.ci-test
liu-657667 Nov 16, 2023
d549d84
ci test 添加log节点
liu-657667 Nov 16, 2023
bf5d8b2
adjust pom
Nov 16, 2023
9d49067
adjust release
Nov 16, 2023
cb6f718
ref jdk17
Nov 16, 2023
c2f395e
feat(upload logo): f6car
qixiaobo Nov 16, 2023
801680d
Merge pull request #308 from qixiaobo/f6carlogo
lvjing2 Nov 16, 2023
7495092
Merge pull request #306 from sofastack/jdk17
lvjing2 Nov 16, 2023
6fca511
move spring adapter into plugin
lvjing2 Nov 17, 2023
0ac7cd8
add just springbooot3 samples
Nov 17, 2023
74e8de2
remove log
Nov 17, 2023
e5ac778
Merge pull request #301 from sofastack/ly_docs
lylingzhen Nov 17, 2023
30bbd98
add properties
Nov 17, 2023
6e17a46
update docs
Nov 17, 2023
b4c4585
update docs
Nov 17, 2023
95386f9
update docs
Nov 17, 2023
9c58b37
fix unit test
Nov 17, 2023
f412878
fix unit test
Nov 17, 2023
acdcca3
fix unit test
Nov 17, 2023
e0b5bf8
unit test
Nov 17, 2023
bf88d79
add ehcache
lvjing2 Nov 17, 2023
751ad7e
fix unit test
Nov 17, 2023
7125168
fix unit test
Nov 17, 2023
878859e
pom.xml
Nov 17, 2023
dceabcc
push
Nov 17, 2023
2bce7e2
push origin
Nov 18, 2023
c704459
deploy
Nov 18, 2023
e283146
version
Nov 18, 2023
9338ac5
adjust version
Nov 18, 2023
261f951
remove sofa-ark-springboot starter
Nov 18, 2023
6affc10
jdk17 latest test
Nov 18, 2023
3037cb2
remove depdency tree
Nov 18, 2023
58b1dfd
ehcache factorybean shared set as false
lvjing2 Nov 19, 2023
79628fc
add ehcache principle
lvjing2 Nov 19, 2023
bad198b
add ehcache samples readme
lvjing2 Nov 19, 2023
826f136
add samples ehcache index
lvjing2 Nov 19, 2023
6e2517c
Merge pull request #310 from sofastack/youji-dev
lvjing2 Nov 19, 2023
3b998aa
update version to 0.5.3
lvjing2 Nov 19, 2023
2d262a4
Merge pull request #311 from sofastack/jdk17
hustchaya Nov 20, 2023
3eb4566
Merge branch 'master' into youji-dev
lvjing2 Nov 20, 2023
2c81f2c
set jedis exclude as default
lvjing2 Nov 20, 2023
c84e50c
Merge pull request #312 from sofastack/youji-dev
lvjing2 Nov 20, 2023
9758159
remove jdk 17 flow
lvjing2 Nov 20, 2023
2fccf5b
<feat> 支持合并部署。
CodeNoobKing Nov 20, 2023
6057d05
Merge branch 'master' into feat.ci-test
liu-657667 Nov 20, 2023
f243bbb
add serverless runtime cd workflow
gongjiu Nov 17, 2023
a40ea2e
Merge branch 'master' into master
gongjiu Nov 20, 2023
4673b10
<feat> add test
CodeNoobKing Nov 20, 2023
bd9cf0c
修改模块url为最新的url
liu-657667 Nov 20, 2023
ca428e4
修改基座Deployment image字段为最新镜像
liu-657667 Nov 20, 2023
b8bd8cd
sample base dockerfile add telnet
Nov 20, 2023
7d9af21
修改基座Deployment image字段为最新镜像
liu-657667 Nov 20, 2023
c7fc208
修改基座image和模块url
liu-657667 Nov 20, 2023
7e9d44f
<feat> 在合适的时机扫描 biz dir 并进行合并部署。
CodeNoobKing Nov 20, 2023
118fc5e
change class name ArkHealthzEndpoint to ArkHealthEndpoint
liu-657667 Nov 21, 2023
270b790
fix ut
liu-657667 Nov 21, 2023
1a4433c
chang name
liu-657667 Nov 21, 2023
6b372ca
add build and deploy step by step
lvjing2 Nov 21, 2023
0d636de
add build and deploy step by step
lvjing2 Nov 21, 2023
ccf3f5f
Revert "remove jdk 17 flow"
lvjing2 Nov 21, 2023
de55213
Merge pull request #319 from sofastack/youji-dev
lvjing2 Nov 21, 2023
5a8607e
<refactor> move listener into another dir
CodeNoobKing Nov 21, 2023
43eaa97
<fix> licence
CodeNoobKing Nov 21, 2023
d57e240
<fix> add configuration
CodeNoobKing Nov 21, 2023
a0a94aa
update docs
Nov 21, 2023
b14aaea
add arkctl test
gongjiu Nov 21, 2023
660238f
Merge branch 'master' of https://github.com/gongjiu/sofa-serverless
gongjiu Nov 21, 2023
b6dc3af
change bash -x to bash
gongjiu Nov 21, 2023
c067ccb
Merge pull request #315 from gongjiu/master
lvjing2 Nov 21, 2023
848b172
release
Nov 21, 2023
b8b15e5
add release
Nov 21, 2023
a0932e7
commit
Nov 21, 2023
5dc3b65
format code
liu-657667 Nov 21, 2023
b7d5280
Merge pull request #321 from sofastack/addjust-release-version
lvjing2 Nov 21, 2023
be8793a
add ci
gongjiu Nov 21, 2023
2ed1a80
set working-directory
gongjiu Nov 21, 2023
cf141b7
set working-directory
gongjiu Nov 21, 2023
d0b80e9
set working-directory
gongjiu Nov 21, 2023
7fb9127
set working-directory
gongjiu Nov 21, 2023
fcfb34c
set need for jobs
gongjiu Nov 21, 2023
c9cde56
set need for jobs
gongjiu Nov 21, 2023
408ae8a
set need for jobs
gongjiu Nov 21, 2023
204fb2c
add ci
gongjiu Nov 21, 2023
4818a31
update mongo data dir
gongjiu Nov 21, 2023
33c492f
update mongo data dir
gongjiu Nov 21, 2023
6af923b
update mongo data dir
gongjiu Nov 21, 2023
fac6f84
rm dubbo test
gongjiu Nov 21, 2023
5e01d98
update doc schedulingPolicy
Nov 21, 2023
5c8021a
add ci test before release
gongjiu Nov 21, 2023
e0ab3b3
Merge pull request #316 from sofastack/liushuo_sample_base_dockerfile…
lylingzhen Nov 21, 2023
5cd2a0e
Merge remote-tracking branch 'origin/master'
Nov 21, 2023
f3a1737
update docs
Nov 21, 2023
20d9339
update revision to 0.5.3.999
gongjiu Nov 21, 2023
01ae124
Merge pull request #318 from sofastack/feat.class-name-change
TomorJM Nov 21, 2023
18d5050
add version check
gongjiu Nov 21, 2023
59bb26f
update revision to 0.5.3
gongjiu Nov 21, 2023
4ae0c17
add ci test for serverless-runtime-snapshot release
gongjiu Nov 21, 2023
4836034
<fix> local e2e test pass
CodeNoobKing Nov 21, 2023
b0511b5
<fix> pom
CodeNoobKing Nov 21, 2023
501bbce
<fix> printtracestack
CodeNoobKing Nov 21, 2023
e967961
<fix> unittest
CodeNoobKing Nov 21, 2023
36daf3d
<fix> format
CodeNoobKing Nov 21, 2023
6ba0469
<fix> remove static mock
CodeNoobKing Nov 21, 2023
7976181
<fix> format
CodeNoobKing Nov 21, 2023
95a121f
<fix> test
CodeNoobKing Nov 21, 2023
ac2c803
Merge pull request #323 from gongjiu/master
lvjing2 Nov 22, 2023
4c51154
<refactor> rename arg
CodeNoobKing Nov 22, 2023
22662f4
<test> add test
CodeNoobKing Nov 22, 2023
3f0812a
fix format
CodeNoobKing Nov 22, 2023
ec2b821
add test
CodeNoobKing Nov 22, 2023
7782cc5
<feat> add download biz jar from maven central repository static buil…
CodeNoobKing Nov 22, 2023
56da9be
修改基座image
liu-657667 Nov 22, 2023
bd43e8e
修改基座image
liu-657667 Nov 22, 2023
9ef9f67
修改基座image
liu-657667 Nov 22, 2023
3c437b1
修改基座image
liu-657667 Nov 22, 2023
62298ca
修改基座image
liu-657667 Nov 22, 2023
0269119
添加log pod
liu-657667 Nov 23, 2023
3d14fa9
fix samples for jdk17
lvjing2 Nov 21, 2023
8b72d3c
add apollo
lvjing2 Nov 23, 2023
b007cb1
修改获取模块安装log
liu-657667 Nov 23, 2023
7324c6c
fix apollo readme
lvjing2 Nov 23, 2023
245ee74
Revert "fix samples for jdk17"
lvjing2 Nov 23, 2023
e7336b7
修改获取模块安装log
liu-657667 Nov 23, 2023
c2a6e07
修改获取模块安装log
liu-657667 Nov 23, 2023
625d190
Merge branch 'master' into feat.image-fix
liu-657667 Nov 23, 2023
f7fd153
添加module-controller log
liu-657667 Nov 23, 2023
84f0522
change module name
liu-657667 Nov 23, 2023
5a2d60f
fix according to review
CodeNoobKing Nov 23, 2023
278c389
change module name
liu-657667 Nov 23, 2023
37be5bd
<fix> format
CodeNoobKing Nov 23, 2023
4083276
fix pom
CodeNoobKing Nov 23, 2023
6bde9ff
<fix> revert change
CodeNoobKing Nov 23, 2023
c36b8ac
<fix> revert change
CodeNoobKing Nov 23, 2023
1899470
更新文档内模块name、version、url为最新版本
liu-657667 Nov 23, 2023
f2b79b7
add apollo index
lvjing2 Nov 23, 2023
940d639
update docs
lvjing2 Nov 23, 2023
7c33953
Merge pull request #328 from sofastack/youji-dev
lvjing2 Nov 23, 2023
ada50fe
Merge pull request #317 from sofastack/feat.image-fix
gold300jin Nov 23, 2023
f6b9d06
<feat> 支持静态合并部署的实验。
CodeNoobKing Nov 23, 2023
2f74a2e
<fix>
CodeNoobKing Nov 23, 2023
574f43f
<fix> message
CodeNoobKing Nov 23, 2023
dadacbc
<doc> complete doc
CodeNoobKing Nov 23, 2023
4f8a914
update dosc
Nov 23, 2023
52d103f
Merge remote-tracking branch 'origin/master'
Nov 23, 2023
927ba9f
update docs
Nov 23, 2023
f09a42d
<fix> according to view
CodeNoobKing Nov 23, 2023
3c3095b
<fix>
CodeNoobKing Nov 23, 2023
44ab810
<refactor> rename listener
CodeNoobKing Nov 23, 2023
3fad4c2
<fix> md
CodeNoobKing Nov 23, 2023
221266f
<refactor> name
CodeNoobKing Nov 23, 2023
e21d267
<fix> format
CodeNoobKing Nov 23, 2023
a601852
Merge branch 'master' into feat.ci-test
liu-657667 Nov 24, 2023
ba41704
更新文档内模块name、version、url为最新版本
liu-657667 Nov 24, 2023
4c1e120
fix image
liu-657667 Nov 24, 2023
f5f2f71
fix image
liu-657667 Nov 24, 2023
341015c
修改ci test
liu-657667 Nov 24, 2023
a4a7900
修改ci test
liu-657667 Nov 24, 2023
1a0c700
修改ci test
liu-657667 Nov 24, 2023
49a38dc
update demo video
lvjing2 Nov 24, 2023
bed0a3c
update pom
CodeNoobKing Nov 24, 2023
95d730e
修改ci test
liu-657667 Nov 24, 2023
4a80a9f
update docs
lvjing2 Nov 24, 2023
00d593c
add index from video
lvjing2 Nov 24, 2023
1d88cf0
Merge pull request #332 from sofastack/youji-dev
lvjing2 Nov 24, 2023
3b8c649
修改ci test
liu-657667 Nov 24, 2023
ac70376
add index ref
lvjing2 Nov 24, 2023
eb7d9e4
Merge pull request #333 from sofastack/youji-dev
lvjing2 Nov 24, 2023
b5e0c01
修改ci test
liu-657667 Nov 24, 2023
0ae0288
修改ci test
liu-657667 Nov 24, 2023
1e04e33
add activation
Nov 24, 2023
8355712
<feat> update pom
CodeNoobKing Nov 24, 2023
aa6633f
add time consume cost
CodeNoobKing Nov 24, 2023
98e76fa
Merge branch 'master' into feat/feat_combine_deploy
CodeNoobKing Nov 24, 2023
2a96bef
修改ci test
liu-657667 Nov 24, 2023
4000204
<fix> format
CodeNoobKing Nov 24, 2023
bd71727
Merge pull request #324 from CodeNoobKing/feat/feat_combine_deploy
lvjing2 Nov 24, 2023
e37c9c7
Merge pull request #303 from sofastack/feat.ci-test
gold300jin Nov 24, 2023
cb82c14
Merge pull request #334 from sofastack/addjust-release-version
lvjing2 Nov 24, 2023
ed7a22d
update docs
Nov 24, 2023
4ea7c3a
update docs
Nov 24, 2023
da156df
update docs
Nov 24, 2023
b420bca
update docs
Nov 24, 2023
33173d6
update docs
Nov 24, 2023
0cbbf9d
update step by step
lvjing2 Nov 24, 2023
b8d62aa
add order number
lvjing2 Nov 24, 2023
e11962b
Merge pull request #336 from sofastack/youji-dev
lvjing2 Nov 24, 2023
29e3096
update docs
Nov 24, 2023
357278c
update docs
Nov 24, 2023
0ad4b39
update videos
Nov 24, 2023
f9f710f
update docs
Nov 24, 2023
7f095a6
update docs
Nov 24, 2023
3f2c478
update docs
Nov 24, 2023
f841325
update docs
Nov 24, 2023
8097ea2
update docs
Nov 24, 2023
e000dd7
<fix> incompatiable with default release script
CodeNoobKing Nov 27, 2023
94b567f
Merge pull request #338 from CodeNoobKing/fix/feat/cibuild
lvjing2 Nov 27, 2023
cd28030
build_and_test version check fix
gongjiu Nov 27, 2023
f8c358d
Merge pull request #339 from gongjiu/ci1127
lvjing2 Nov 27, 2023
4468d6d
add build plugin comment
Nov 27, 2023
65e5aae
replace version
Nov 27, 2023
d60cb2d
Merge pull request #341 from sofastack/add-comment
lvjing2 Nov 27, 2023
4d39f75
build_and_test version check fix
gongjiu Nov 27, 2023
41ab62c
fix jdk17 ci test
gongjiu Nov 27, 2023
dc9c3f8
fix log4j test
gongjiu Nov 27, 2023
bdfd691
merge upstream
gongjiu Nov 27, 2023
1eb65a3
fix log4j test
gongjiu Nov 27, 2023
a48ea15
update docs
Nov 27, 2023
ea1c8cc
Merge pull request #343 from gongjiu/master
lvjing2 Nov 27, 2023
ac122e1
Merge pull request #2 from sofastack/master
chenlei3641 Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
68 changes: 68 additions & 0 deletions .github/workflows/arklet_cd_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: SOFA Serverless Runtime CD Test
## trigger manually
on:
workflow_dispatch:

# Environment variables available to all jobs and steps in this workflow.
env:
NAMESPACE: sofaark_test
IMAGE: sofa-runtime-cdtest
TAG: ${{ github.sha }}

permissions:
contents: read

jobs:
ci_test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven

- name: Set up Docker
uses: docker/metadata-action@v3
with:
images: |
node:14


- name: get sofa-runtime version & update sofa-runtime version for all test sample app
run: |
serverless_runtime_version=`egrep "<revision.default>([^<]+)</revision.default>" sofa-serverless-runtime/pom.xml |awk -F "revision.default>|</revision.default" '{print $2}'`
echo "升级sofa-runtime version to $serverless_runtime_version"
for testsample in `find samples -name "*-samples"`;do sed -i "s/<sofa.serverless.runtime.version>.*<\/sofa.serverless.runtime.version>/<sofa.serverless.runtime.version>$serverless_runtime_version<\/sofa.serverless.runtime.version>/g" $testsample/pom.xml ;done

- name: Test Env prepare
run: |
sudo apt-get update >>/tmp/envprepare.out
sudo apt-get install -y expect >>/tmp/envprepare.out
docker pull mongo:7.0.2-jammy
docker run --name mongodb -d -p 27017:27017 -v /home/runner/work/data:/data/db mongo:7.0.2-jammy
docker pull zookeeper:3.9.0
docker run -p 2181:2181 -it --name zookeeper --restart always -d zookeeper:3.9.0
sudo apt-get install redis-server -y
sudo systemctl start redis-server
sudo cp samples/ccbin/arkctl /usr/bin/arkctl

- name: Run jdk8 serverless runtime test
run: |
set -e
bash samples/ccbin/start.sh jdk8

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Run jdk17 serverless runtime test
run: |
set -e
bash samples/ccbin/start.sh jdk17
10 changes: 5 additions & 5 deletions .github/workflows/arklet_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
cache: maven

- name: Test
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -U
run: mvn clean install -DskipTests -P8-release -Dmaven.javadoc.skip=true -B -U
&& sh ./check_format.sh
&& mvn test
&& mvn test -P8-release

- name: upload coverage reports to Codecov with github action
uses: codecov/codecov-action@v3
Expand All @@ -56,9 +56,9 @@ jobs:
cache: maven

- name: Test
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -U
run: mvn clean install -DskipTests -P17-release -Dmaven.javadoc.skip=true -B -U
&& sh ./check_format.sh
&& mvn test
&& mvn test -P17-release

- name: upload coverage reports to Codecov with github action
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v3
Binary file added .github/workflows/ccbin/arkctl
Binary file not shown.
59 changes: 59 additions & 0 deletions .github/workflows/ccbin/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
## 返回值 0 : 成功
## 返回值 1 : 检查失败导致
## 返回值 2 : 链接超时导致
##
## Usage : sh bin/healthcheck.sh

HEALTH_URL="http://localhost:8080/health"
HEALTH_CHECK_COMMOND="curl -s --connect-timeout 3 --max-time 5 ${HEALTH_URL}"

echo " -- SOFA Boot CheckService"
echo " -- HealthCheck URL : ${HEALTH_URL}"
#success:0;failure:1;timeout:2,and default value is failure=1
status=1
#default 120s
times=30

for num in $(seq $times); do
sleep 1
COSTTIME=$(($times - $num ))

HEALTH_CHECK_CODE=`${HEALTH_CHECK_COMMOND} -o /dev/null -w %{http_code}`
# reference : https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-monitoring.html#production-ready-health-access-restrictions
if [ "$HEALTH_CHECK_CODE" == "200" ]; then
#success
status=0;
break;
elif [ "$HEALTH_CHECK_CODE" == "503" ] ; then
echo -n -e "\r -- HealthCheck Cost Time `expr $num` seconds."
# failure
status=1;
break;
else
# starting
# echo -n -e "\r -- HealthCheck Remaining Time `expr $COSTTIME` seconds."
status=2;
fi
done

SOFA_BOOT_HEALTH_CHECK_RESULT="SUCCESS";

if [ $status -eq 1 ]; then
echo " -- HealthCheck Failed.-- Current Server Responded Http Code ${HEALTH_CHECK_CODE}"
SOFA_BOOT_HEALTH_CHECK_RESULT=`${HEALTH_CHECK_COMMOND}`;
# 重定向到标准错误流,zpaas 平台捕获打印
echo -e "Health Check Result \n$SOFA_BOOT_HEALTH_CHECK_RESULT" >&2
exit 1;
fi

if [ $status -eq 2 ]; then
SOFA_BOOT_HEALTH_CHECK_RESULT="Could Not Connect to ${HEALTH_URL}.HealthCheck ${times} Seconds Timeout!";
# 重定向到标准错误流,zpaas 平台捕获打印
echo -e "Health Check Result \n$SOFA_BOOT_HEALTH_CHECK_RESULT" >&2
exit 2;
fi

# success
# 重定向到标准错误流,zpaas 平台捕获打印
echo -e "Health Check Result \n$SOFA_BOOT_HEALTH_CHECK_RESULT" >&2
137 changes: 137 additions & 0 deletions .github/workflows/ccbin/moduletest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
#!/bin/bash

function module_biz_install_test() {
bizName=$1
bizDir=$2

/usr/bin/expect <<EOF
set fp [open "test_output.txt" w]
set timeout 5
spawn telnet localhost 1234
expect {
"Escape character is '^]'." {
puts -nonewline \$fp "Telnet connection success!\n"
}
timeout {
puts -nonewline \$fp "Telnet connection failed!\n"
}
eof {
puts -nonewline \$fp "Telnet connection failed!\n"
}
}
send "biz -i file://$bizDir\r"
expect {
"Start to process install command now, pls wait and check." {
puts -nonewline \$fp "module installing!\n"
}
timeout {
puts -nonewline \$fp "module install failed!\n"
}
eof {
puts -nonewline \$fp "Telnet connection failed!\n"
}
}
sleep 10
send "biz -a\r"
expect {
"$bizName*activated" {
puts -nonewline \$fp "module install success!\n"
}
timeout {
puts -nonewline \$fp "module install failed!\n"
}
eof {
puts -nonewline \$fp "Telnet connection failed!\n"
}
}
send "exit\r"
expect {
"Connection closed by foreign host" {
puts -nonewline \$fp "close telnet success!\n"
}
timeout {
puts -nonewline \$fp "close telnet failed!\n"
}
eof {
puts -nonewline \$fp "close telnet failed!\n"
}
}
close \$fp

EOF
}

function arkctl_module_biz_install_test() {
bizName=$1
bizVersion=$2
bizDir=$3

arkctl deploy $bizDir
arkStatus=$(arkctl status)
# 提取数据部分
data=$(echo $arkStatus | awk -F "QueryAllBiz " '{print $2}')
# 校验状态
if echo $data | grep -q "\"bizName\":\"$bizName\",\"bizState\":\"ACTIVATED\""; then
echo "biz $bizName install success"
else
echo "biz $bizName install failed:$arkStatus"
exit 1
fi
# 卸载模块
uninstallResult=$(curl --location 'http://localhost:1238/uninstallBiz' \
--header 'Content-Type: application/json' \
--data "{
\"bizName\":\"$bizName\",
\"bizVersion\":\"$bizVersion\"
}")
# 校验卸载
if echo $uninstallResult | grep -q "Uninstall biz: $bizName:$bizVersion success."; then
echo "biz $bizName unInstall success"
else
echo "biz $bizName unInstall failed:$uninstallResult"
exit 1
fi
# 2次安装
arkctl deploy $bizDir
arkStatus=$(arkctl status)
# 提取数据部分
data=$(echo $arkStatus | awk -F "QueryAllBiz " '{print $2}')
# 校验状态
if echo $data | grep -q "\"bizName\":\"$bizName\",\"bizState\":\"ACTIVATED\""; then
echo "biz $bizName install success"
else
echo "biz $bizName install failed:$arkStatus"
exit 1
fi
}

set -e
#测试路径
echo "BaseDir=$BaseDir"
cd $BaseDir/..

BIZ_INSTALL_URL="http://localhost:8080/module/install"
BIZ_LIST_URL="http://localhost:8080/module/list"

for moduleBootDir in $(find $(pwd) -type d -path "*/biz[1-9]" -o -path "*/*biz" |grep -v src|grep -v target|grep -v logs);do
echo "start deploy $moduleBootDir"
cd $moduleBootDir

echo "找到$(find $(pwd) -name "*-ark-biz.jar" | wc -l)个模块!"
for moduleJar in $(find $(pwd) -name "*-ark-biz.jar");do
moduleName=$(echo $moduleJar |awk -F "target/" '{print $2}' | sed -e 's/-[0-9].*$//')
moduleVersion=$(echo "$moduleJar" | sed "s/.*$moduleName-\(.*\)-ark-biz.jar/\1/")
echo "find one module, moduleName:$moduleName,moduleVersion:$moduleVersion, jar:$moduleJar"
echo ''>test_output.txt
arkctl_module_biz_install_test ${moduleName} ${moduleVersion} $moduleJar
# echo "start check module install result "
# cat test_output.txt|while read line;do
# if [[ $line =~ "failed" ]];then
# echo "module install fail:$line"
# exit 1
# fi
# done
done
echo "$BaseDir 测试完成!"
done

72 changes: 72 additions & 0 deletions .github/workflows/ccbin/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/bash

function kill_java_process() {
local bootpids=`ps aux|grep java|grep sofa-runtimetest| grep -v grep |awk '{print $2;}'`
local boot_pid_array=($bootpids)
echo -e "\\nkilling SOFABoot processes:${boot_pid_array[@]}"
for bootpid in "${boot_pid_array[@]}"
do
if [ -z "$bootpid" ]; then
continue;
fi
echo "kill $bootpid"
kill $bootpid
/bin/sleep 3
killed_pid=`ps aux|grep java|grep $bootpid |awk '{print $2;}'`

if [[ "$killed_pid" == "$bootpid" ]]; then
echo "Kill $bootpid don't work and kill -9 $bootpid used violently!"
kill -9 $bootpid
fi
done
}

set -e

#dobbo common-model
ROOTDir=$(pwd)
testSuite=$1
echo "start testsuite:$testSuite"
if [[ $testSuite == "jdk8" ]];then
suiteReg="*[^3|^dubbo]-samples"
else
# suiteReg="*[3|dubbo]-samples"
suiteReg="*[3]-samples"

fi
#测试路径
for TEST_DIR in $(find $(pwd) -name "$suiteReg");do
TESTAPP_DIR=$TEST_DIR
echo "TESTAPP_DIR=$TESTAPP_DIR"
cd ${TESTAPP_DIR}
mvn clean install -U -Dmaven.test.skip=true
for BaseDir in $( find $(pwd) -type d -name "*base" |grep -v src|grep -v target|grep -v mybatis|grep -v logs);do
echo "BaseDir $BaseDir"
export BaseDir=$BaseDir
cd $BaseDir

echo "start clean old java processes"
kill_java_process

baseJar=$(find . -name "*[base|bootstrap]-*.jar"|grep -v facade)
echo "Deployed base app $baseJar"
if [[ "$baseJar" == "" ]];then
echo "找不到基座jar包!"
exit 1
fi
java -Dtest=sofa-runtimetest -Drpc_bind_network_interface=eth0 -jar $baseJar >/dev/null 2>&1 &
sleep 5

echo "Start health check"
bash $ROOTDir/.github/workflows/ccbin/healthcheck.sh

echo "Start module biz Test"
bash $ROOTDir/.github/workflows/ccbin/moduletest.sh

echo "测试通过 $BaseDir"

done
done

set +e

Loading
Loading