Skip to content

Commit fc9c594

Browse files
authored
use same path mount point in e2e-compose and merge-run (#319)
* same path mount * fix merge run mount point
1 parent 8ee01ed commit fc9c594

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.github/workflows/e2e-compose.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ jobs:
6161
cat ./etc/launch-tae-compose/config/cn-1.toml
6262
cat ./etc/launch-tae-compose/config/tn.toml
6363
64+
# Update compose.yaml to mount test directory to $GITHUB_WORKSPACE/test instead of /test
65+
# Replace container mount point from /test to $GITHUB_WORKSPACE/test
66+
# Handle various docker-compose volume formats: /test, /test:options, /test followed by space
67+
sed -i 's|:/test\b|:'"$GITHUB_WORKSPACE"'/test|g' ./etc/launch-tae-compose/compose.yaml
68+
6469
mkdir -p ${{ github.workspace }}/docker-compose-log
6570
docker compose -f etc/launch-tae-compose/compose.yaml --profile launch-multi-cn up -d --build
6671
@@ -120,7 +125,7 @@ jobs:
120125
cat mo.yml
121126
echo "============================="
122127
123-
./run.sh -n -g -o -p /test/distributed/cases -e pessimistic_transaction 2>&1
128+
./run.sh -n -g -o -p $GITHUB_WORKSPACE/test/distributed/cases -e pessimistic_transaction 2>&1
124129
125130
- name: Print Docker Info Before Container Shutdown
126131
if: ${{ always() }}
@@ -213,6 +218,12 @@ jobs:
213218
cat ./etc/launch-tae-compose/config/cn-0.toml
214219
cat ./etc/launch-tae-compose/config/cn-1.toml
215220
cat ./etc/launch-tae-compose/config/tn.toml
221+
222+
# Update compose.yaml to mount test directory to $GITHUB_WORKSPACE/test instead of /test
223+
# Replace container mount point from /test to $GITHUB_WORKSPACE/test
224+
# Handle various docker-compose volume formats: /test, /test:options, /test followed by space
225+
sed -i 's|:/test\b|:'"$GITHUB_WORKSPACE"'/test|g' ./etc/launch-tae-compose/compose.yaml
226+
216227
mkdir -p ${{ github.workspace }}/docker-compose-log
217228
docker compose -f etc/launch-tae-compose/compose.yaml --profile launch-multi-cn up -d --build
218229
@@ -269,7 +280,7 @@ jobs:
269280
cat mo.yml
270281
echo "============================="
271282
272-
./run.sh -n -g -o -p /test/distributed/cases -e optimistic 2>&1
283+
./run.sh -n -g -o -p $GITHUB_WORKSPACE/test/distributed/cases -e optimistic 2>&1
273284
274285
- name: Print Docker Info Before Container Shutdown
275286
if: ${{ always() }}

.github/workflows/merge-trigger-tke.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
- name: Prepare Data in cn-0
207207
timeout-minutes: 5
208208
run: |
209-
kubectl exec -it ${{ steps.get_mo_addr.outputs.cn_0 }} -n mo-checkin-regression-${{ github.event.pull_request.number }} -- bash -c '
209+
kubectl exec -it ${{ steps.get_mo_addr.outputs.cn_0 }} -n mo-checkin-regression-${{ github.event.pull_request.number }} -- env GITHUB_WORKSPACE=$GITHUB_WORKSPACE bash -c '
210210
set -x;
211211
export https_proxy=http://proxy-service.proxy.svc.cluster.local:8001
212212
git config --global init.defaultBranch main
@@ -231,12 +231,17 @@ jobs:
231231
if [ $success == "no" ]; then
232232
exit 1;
233233
fi
234+
235+
# 创建对应的目录结构和符号链接,容器内外资源目录一致
236+
mkdir -p $GITHUB_WORKSPACE/matrixone/test/distributed
237+
ln -sf $path_matrixone/matrixone/test/distributed/resources $GITHUB_WORKSPACE/matrixone/test/distributed/resources
238+
234239
exit 0;
235240
'
236241
- name: Prepare Data in cn-1
237242
timeout-minutes: 5
238243
run: |
239-
kubectl exec -it ${{ steps.get_mo_addr.outputs.cn_1 }} -n mo-checkin-regression-${{ github.event.pull_request.number }} -- bash -c '
244+
kubectl exec -it ${{ steps.get_mo_addr.outputs.cn_1 }} -n mo-checkin-regression-${{ github.event.pull_request.number }} -- env GITHUB_WORKSPACE=$GITHUB_WORKSPACE bash -c '
240245
set -x;
241246
export https_proxy=http://proxy-service.proxy.svc.cluster.local:8001
242247
git config --global init.defaultBranch main
@@ -261,6 +266,11 @@ jobs:
261266
if [ $success == "no" ]; then
262267
exit 1;
263268
fi
269+
270+
# 创建对应的目录结构和符号链接
271+
mkdir -p $GITHUB_WORKSPACE/matrixone/test/distributed
272+
ln -sf $path_matrixone/matrixone/test/distributed/resources $GITHUB_WORKSPACE/matrixone/test/distributed/resources
273+
264274
exit 0;
265275
'
266276
bvt_test:
@@ -302,7 +312,7 @@ jobs:
302312
echo "=========================="
303313
304314
cd $GITHUB_WORKSPACE/mo-tester
305-
./run.sh -n -g -o -p $GITHUB_WORKSPACE/matrixone/test/distributed/cases -s /matrixone/test/distributed/resources -e optimistic 2>&1
315+
./run.sh -n -g -o -p $GITHUB_WORKSPACE/matrixone/test/distributed/cases -e optimistic 2>&1
306316
rm -rf .git lib
307317
- name: Collect Upload files
308318
if: ${{ always() || cancelled() }}

0 commit comments

Comments
 (0)