mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-05 02:00:31 -07:00
fix missing symlink to mysql binaries for MariaDB 11+
This commit is contained in:
parent
4b297b6eda
commit
65e385114d
2 changed files with 29 additions and 15 deletions
21
.github/workflows/ansible-test-plugins.yml
vendored
21
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -54,8 +54,8 @@ jobs:
|
|||
db_engine_version:
|
||||
- '8.0.38'
|
||||
- '8.4.1'
|
||||
- '10.5.25'
|
||||
- '10.11.8'
|
||||
- '11.4.5'
|
||||
connector_name:
|
||||
- pymysql
|
||||
- mysqlclient
|
||||
|
@ -87,10 +87,10 @@ jobs:
|
|||
exclude:
|
||||
|
||||
- db_engine_name: mysql
|
||||
db_engine_version: '10.5.25'
|
||||
db_engine_version: '10.11.8'
|
||||
|
||||
- db_engine_name: mysql
|
||||
db_engine_version: '10.11.8'
|
||||
db_engine_version: '11.4.5'
|
||||
|
||||
- db_engine_name: mariadb
|
||||
db_engine_version: '8.0.38'
|
||||
|
@ -119,13 +119,13 @@ jobs:
|
|||
- db_engine_version: '8.0.38'
|
||||
ansible: stable-2.17
|
||||
|
||||
- db_engine_version: '10.5.25'
|
||||
- db_engine_version: '10.11.8'
|
||||
ansible: stable-2.17
|
||||
|
||||
- db_engine_version: '8.0.38'
|
||||
ansible: devel
|
||||
|
||||
- db_engine_version: '10.5.25'
|
||||
- db_engine_version: '10.11.8'
|
||||
ansible: devel
|
||||
|
||||
- db_engine_version: '8.4.1'
|
||||
|
@ -162,7 +162,10 @@ jobs:
|
|||
db_engine_version: '8.0.38'
|
||||
|
||||
- connector_version: '1.1.1'
|
||||
db_engine_version: '10.5.25'
|
||||
db_engine_version: '10.11.8'
|
||||
|
||||
env:
|
||||
HEALTH_CMD: ${{ matrix.db_engine_name == 'mysql' && 'mysqladmin' || 'mariadb-admin' }}
|
||||
|
||||
services:
|
||||
db_primary:
|
||||
|
@ -175,7 +178,7 @@ jobs:
|
|||
# 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-cmd "${{ env.HEALTH_CMD }} ping -P 3306 -pmsandbox |grep alive || exit 1"
|
||||
--health-start-period 10s
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
|
@ -189,7 +192,7 @@ jobs:
|
|||
ports:
|
||||
- 3308:3306
|
||||
options: >-
|
||||
--health-cmd "mysqladmin ping -P 3306 -pmsandbox |grep alive || exit 1"
|
||||
--health-cmd "${{ env.HEALTH_CMD }} ping -P 3306 -pmsandbox |grep alive || exit 1"
|
||||
--health-start-period 10s
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
|
@ -203,7 +206,7 @@ jobs:
|
|||
ports:
|
||||
- 3309:3306
|
||||
options: >-
|
||||
--health-cmd "mysqladmin ping -P 3306 -pmsandbox |grep alive || exit 1"
|
||||
--health-cmd "${{ env.HEALTH_CMD }} ping -P 3306 -pmsandbox |grep alive || exit 1"
|
||||
--health-start-period 10s
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
|
|
23
Makefile
23
Makefile
|
@ -11,6 +11,17 @@ ifdef continue_on_errors
|
|||
_continue_on_errors = --continue-on-error
|
||||
endif
|
||||
|
||||
# Set command variables based on database engine
|
||||
# Required for MariaDB 11+ which no longer includes mysql named compatible
|
||||
# executable symlinks
|
||||
ifeq ($(db_engine_name),mysql)
|
||||
_command = mysqld
|
||||
_health_cmd = mysqladmin
|
||||
else
|
||||
_command = mariadbd
|
||||
_health_cmd = mariadb-admin
|
||||
endif
|
||||
|
||||
.PHONY: test-integration
|
||||
test-integration:
|
||||
@echo -n $(db_engine_name) > tests/integration/db_engine_name
|
||||
|
@ -29,9 +40,9 @@ test-integration:
|
|||
--env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
--network podman \
|
||||
--publish 3307:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
--health-cmd '$(_health_cmd) ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
docker.io/library/$(db_engine_name):$(db_engine_version) \
|
||||
mysqld
|
||||
$(_command)
|
||||
podman run \
|
||||
--detach \
|
||||
--replace \
|
||||
|
@ -40,9 +51,9 @@ test-integration:
|
|||
--env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
--network podman \
|
||||
--publish 3308:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
--health-cmd '$(_health_cmd) ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
docker.io/library/$(db_engine_name):$(db_engine_version) \
|
||||
mysqld
|
||||
$(_command)
|
||||
podman run \
|
||||
--detach \
|
||||
--replace \
|
||||
|
@ -51,9 +62,9 @@ test-integration:
|
|||
--env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
--network podman \
|
||||
--publish 3309:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
--health-cmd '$(_health_cmd) ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
docker.io/library/$(db_engine_name):$(db_engine_version) \
|
||||
mysqld
|
||||
$(_command)
|
||||
# Setup replication and restart containers using the same subshell to keep variables alive
|
||||
db_ver=$(db_engine_version); \
|
||||
maj="$${db_ver%.*.*}"; \
|
||||
|
|
Loading…
Add table
Reference in a new issue