I have this stage on my gitlab-ci.yml but while executing i always got
ERROR 2005 (HY000): Unknown server host 'mariadb' (-3)
If i run a service mysql status, the connection is been active
# ...
database_building:
stage: database_building
services:
- name: mariadb:11.0.3
alias: mariadb
variables:
MYSQL_ROOT_PASSWORD: testpsw
MYSQL_DATABASE: testdb
MYSQL_USER: testdb
MYSQL_PASSWORD: testdb
before_script:
- mysql -u testdb -ptestdb -h mariadb testdb
script:
- ls
# ...