This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 2934405ac chore(ci): offload healthcheck logic to docker-compose
config (#2901)
2934405ac is described below
commit 2934405acda7b595e3e598ca442314e3219d95b3
Author: oowl <[email protected]>
AuthorDate: Tue Aug 22 11:51:18 2023 +0800
chore(ci): offload healthcheck logic to docker-compose config (#2901)
* chore(ci): offload healthcheck logic to docker-compose config
* chore(ci): fix code
---
.github/workflows/service_test_s3.yml | 5 -----
core/src/services/s3/fixtures/docker-compose-minio.yml | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/service_test_s3.yml
b/.github/workflows/service_test_s3.yml
index b83b89dd2..80ed0ee4e 100644
--- a/.github/workflows/service_test_s3.yml
+++ b/.github/workflows/service_test_s3.yml
@@ -146,11 +146,6 @@ jobs:
working-directory: core/src/services/s3/fixtures
run: |
docker-compose -f docker-compose-minio.yml up -d
- while :; do
- echo "waiting minio docker to be ready"
- [[ "$(curl -I http://127.0.0.1:9000/minio/health/live 2>/dev/null
| head -n 1 | cut -d$' ' -f2)" == "200" ]] && break
- sleep 1
- done
- name: Setup test bucket
run: |
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc
diff --git a/core/src/services/s3/fixtures/docker-compose-minio.yml
b/core/src/services/s3/fixtures/docker-compose-minio.yml
index 0e47e8d49..8efc376a7 100644
--- a/core/src/services/s3/fixtures/docker-compose-minio.yml
+++ b/core/src/services/s3/fixtures/docker-compose-minio.yml
@@ -25,3 +25,8 @@ services:
environment:
MINIO_ACCESS_KEY: "minioadmin"
MINIO_SECRET_KEY: "minioadmin"
+ healthcheck:
+ test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
+ interval: 30s
+ timeout: 20s
+ retries: 3