[skip e2e] Print container logs for ut (#21817)

Signed-off-by: Bennu-Li <yunmei.li@zilliz.com>
pull/21872/head
Bennu 2023-01-30 14:07:50 +08:00 committed by GitHub
parent cd664adb50
commit 06549674d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -79,12 +79,19 @@ jobs:
./build/builder.sh /bin/bash -c "make ci-ut"
- name: Get the status & restart count for containers when ut failed
if: ${{ failure() }}
run: |
run: |
echo "----show current status for each container---"
docker ps --format "table {{.Names}}\t\t{{.Image}}\t\t{{.Status}}"
for container in $(docker ps --format "table {{.Names}}" | grep -v "NAMES"); do
docker ps -a --format "table {{.Names}}\t\t{{.Image}}\t\t{{.Status}}"
for container in $(docker ps -a --format "table {{.Names}}" | grep -v "NAMES"); do
echo "restart count for ${container} is $(docker inspect ${container} --format '{{json .RestartCount}}')"
done
for container in $(docker ps -a --format "table {{.Names}}" | grep -v "NAMES"); do
if [ "$(docker inspect ${container} --format '{{json .State.Status}}')" != "running" ]
then
echo "--------- logs for ${container}, status: $(docker inspect ${container} --format '{{json .State.Status}}') ------------"
docker logs ${container} --tail=200
fi
done
- name: Upload coverage to Codecov
if: "github.repository == 'milvus-io/milvus'"
uses: codecov/codecov-action@v3.1.1

View File

@ -45,7 +45,7 @@ services:
make check-proto-product && make verifiers && make unittest"
etcd:
image: docker.io/bitnami/etcd:3.5.0-debian-10-r24
image: milvusdb/etcd:3.5.0-r7
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_AUTO_COMPACTION_MODE=revision