Multiple Mysql Instances in bitbucket pipelines

I am wondering if it is possible to spin up two different databases on the same mysql instance in bitbucket pipelines during testing

2 comments

Did you work this out?

You could call the mysql client with the root password to create another database, like so:

image: php:7.2-fpm-alpine
pipelines: 
  default: 
    - step: 
        script: 
          - ... 
          - RUN apk add mysql-client
- mysql -u root -pyo -h 127.0.0.1 -e "CREATE DATABASE pipelines_secondary"
- ...
services: - mysql definitions: services: mysql: image: mysql:5.7 environment: MYSQL_DATABASE: 'pipelines' MYSQL_ROOT_PASSWORD: 'yo' MYSQL_USER: 'test_user' MYSQL_PASSWORD: 'test_user_password'

Comment

Log in or Sign up to comment
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,319 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you