mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-23 13:20:25 -07:00
Add back docker healthcheck on services
I saw in the GHA logs that it perform an healtcheck ! So I hope this will work.
This commit is contained in:
parent
987292669c
commit
19e9116803
1 changed files with 26 additions and 3 deletions
29
.github/workflows/ansible-test-plugins.yml
vendored
29
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -89,6 +89,16 @@ jobs:
|
|||
MYSQL_ROOT_PASSWORD: msandbox
|
||||
ports:
|
||||
- 3307:3306
|
||||
# We write our own health-cmd because the mariadb container does not
|
||||
# provide a healthcheck
|
||||
options: >-
|
||||
--health-cmd "mysqladmin ping -P 3306 -pmsandbox"
|
||||
| grep alive
|
||||
|| exit 1
|
||||
--health-start-period 10s
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 6
|
||||
|
||||
db_replica1:
|
||||
image: ${{ matrix.db_engine_version }}
|
||||
|
@ -99,6 +109,14 @@ jobs:
|
|||
- 3308:3306
|
||||
volumes:
|
||||
- ${{ github.workspace }}/tests/integration/setup_mysql/replica1/:/etc/mysql/conf.d/
|
||||
options: >-
|
||||
--health-cmd "mysqladmin ping -P 3306 -pmsandbox"
|
||||
| grep alive
|
||||
|| exit 1
|
||||
--health-start-period 10s
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 6
|
||||
|
||||
db_replica2:
|
||||
image: ${{ matrix.db_engine_version }}
|
||||
|
@ -109,11 +127,16 @@ jobs:
|
|||
- 3309:3306
|
||||
volumes:
|
||||
- ${{ github.workspace }}/tests/integration/setup_mysql/replica2/:/etc/mysql/conf.d/
|
||||
options: >-
|
||||
--health-cmd "mysqladmin ping -P 3306 -pmsandbox"
|
||||
| grep alive
|
||||
|| exit 1
|
||||
--health-start-period 10s
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 6
|
||||
|
||||
steps:
|
||||
- name: 'Wait 20s for the service containers to be healthy'
|
||||
run:
|
||||
sleep 20;
|
||||
|
||||
- name: >-
|
||||
Perform integration testing against
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue