mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
[skip e2e]Export logs after first test for deploy test (#17221)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
c12ee2f5cb
commit
3a8099f68d
25
.github/workflows/deploy-test.yaml
vendored
25
.github/workflows/deploy-test.yaml
vendored
@ -109,6 +109,14 @@ jobs:
|
|||||||
if [ ${{ matrix.task }} == "upgrade" ]; then
|
if [ ${{ matrix.task }} == "upgrade" ]; then
|
||||||
python3 action_before_upgrade.py
|
python3 action_before_upgrade.py
|
||||||
fi
|
fi
|
||||||
|
- name: Export logs
|
||||||
|
if: ${{ always() }}
|
||||||
|
shell: bash
|
||||||
|
working-directory: tests/python_client/deploy/${{ matrix.mode }}
|
||||||
|
run: |
|
||||||
|
docker-compose ps -a || true
|
||||||
|
mkdir -p logs/first_deploy
|
||||||
|
bash ../../../scripts/export_log_docker.sh ./logs/first_deploy || echo "export logs failed"
|
||||||
- name: Second Milvus deployment
|
- name: Second Milvus deployment
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -145,8 +153,8 @@ jobs:
|
|||||||
working-directory: tests/python_client/deploy/${{ matrix.mode }}
|
working-directory: tests/python_client/deploy/${{ matrix.mode }}
|
||||||
run: |
|
run: |
|
||||||
docker-compose ps -a || true
|
docker-compose ps -a || true
|
||||||
mkdir -p logs
|
mkdir -p logs/second_deploy
|
||||||
bash ../../../scripts/export_log_docker.sh ./logs || echo "export logs failed"
|
bash ../../../scripts/export_log_docker.sh ./logs/second_deploy || echo "export logs failed"
|
||||||
- name: 'Send mail'
|
- name: 'Send mail'
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: dawidd6/action-send-mail@v3
|
uses: dawidd6/action-send-mail@v3
|
||||||
@ -263,7 +271,14 @@ jobs:
|
|||||||
# first test
|
# first test
|
||||||
if [ ${{ matrix.task }} == "reinstall" ]; then python scripts/action_before_reinstall.py; fi
|
if [ ${{ matrix.task }} == "reinstall" ]; then python scripts/action_before_reinstall.py; fi
|
||||||
if [ ${{ matrix.task }} == "upgrade" ]; then python scripts/action_before_upgrade.py; fi
|
if [ ${{ matrix.task }} == "upgrade" ]; then python scripts/action_before_upgrade.py; fi
|
||||||
|
- name: Export logs
|
||||||
|
if: ${{ always() }}
|
||||||
|
shell: bash
|
||||||
|
working-directory: tests/python_client/deploy
|
||||||
|
run: |
|
||||||
|
kubectl get pod
|
||||||
|
# export k8s log for milvus
|
||||||
|
bash ../../scripts/export_log_k8s.sh default deploy-testing k8s_logs/first_deploy
|
||||||
- name: Restart Milvus
|
- name: Restart Milvus
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -311,10 +326,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
kubectl get pod
|
kubectl get pod
|
||||||
# export k8s log for milvus
|
# export k8s log for milvus
|
||||||
bash ../../scripts/export_log_k8s.sh default deploy-testing
|
bash ../../scripts/export_log_k8s.sh default deploy-testing k8s_logs/second_deploy
|
||||||
|
|
||||||
- name: Upload logs
|
- name: Upload logs
|
||||||
if: ${{ always() }}
|
if: ${{ failure() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: helm-log-${{ matrix.mode }}-${{ matrix.task }}
|
name: helm-log-${{ matrix.mode }}-${{ matrix.task }}
|
||||||
|
|||||||
2
.github/workflows/pod-kill-chaos-test.yaml
vendored
2
.github/workflows/pod-kill-chaos-test.yaml
vendored
@ -217,7 +217,7 @@ jobs:
|
|||||||
bash ../../scripts/export_log_k8s.sh chaos-testing chaos-daemon k8s_logs/chaos-mesh-daemon
|
bash ../../scripts/export_log_k8s.sh chaos-testing chaos-daemon k8s_logs/chaos-mesh-daemon
|
||||||
|
|
||||||
- name: Upload logs
|
- name: Upload logs
|
||||||
if: ${{ always() }}
|
if: ${{ failure() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: logs-${{ matrix.pod }}
|
name: logs-${{ matrix.pod }}
|
||||||
|
|||||||
@ -13,7 +13,10 @@ fi
|
|||||||
echo "export logs start"
|
echo "export logs start"
|
||||||
for container in ${array[*]}
|
for container in ${array[*]}
|
||||||
do
|
do
|
||||||
echo "export logs for container $container "
|
if [[ $container == milvus-* ]];
|
||||||
docker logs $container > ./$log_dir/$container.log 2>&1 || echo "export logs for container $container failed"
|
then
|
||||||
|
echo "export logs for container $container "
|
||||||
|
docker logs $container > ./$log_dir/$container.log 2>&1 || echo "export logs for container $container failed"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
echo "export logs done"
|
echo "export logs done"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user