I have a private repository where I did some experiments connecting to a mysql database. I wanted to show a problem to the community and created another repository which is empty, but where I copied an identical version of my pipeline.
To my surprise in this repository the pipeline fails. So now I have a second problem. Why does the same pipeline work in one repo and not in another one?
This is the public repository where it fails: https://bitbucket.org/szabgab/my-experiment/src/master/
This is the rather self-serving pipeline.
I guess there is something obvious I miss, but I don't know why would this pipeline work in one repo and fail with
<span>ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)</span>
in another repo.
image: mysql:5.7
definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: 'test_db'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: 'test_user'
MYSQL_PASSWORD: 'test_password'
pipelines:
default:
- step:
script:
- mysql --version
- mysql -h 127.0.0.1 -u test_user --password=test_password -D test_db --execute="SHOW DATABASES"
- mysql -h 127.0.0.1 -u test_user --password=test_password -D test_db --execute="SHOW VARIABLES"
services:
- mysql