Setting up Bitbucket Pipeline

testing
(Emma L Aboukasm) #1

How should we set up a configuration .yml file in Bitbucket? We want to automate testing for our cockroach DB. Similar to something like the following:
(Found from this documentation https://confluence.atlassian.com/bitbucket/test-with-databases-in-bitbucket-pipelines-856697462.html

image: node:6.9.4
pipelines:
default:
- step:
script:
- npm install
- npm test
services:
- mysql

definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: ‘pipelines’
MYSQL_RANDOM_ROOT_PASSWORD: ‘yes’
MYSQL_USER: ‘test_user’
MYSQL_PASSWORD: ‘test_user_password’

0 Likes

(Tim O'Brien) #2

Hey Emma,

At the moment, we don’t support automatically creating a default database, users, etc in Docker. We’re tracking this as a request here: https://github.com/cockroachdb/cockroach/issues/19826. Once that’s complete, the configuration should be simple.

In the meantime, you might be able to use the script section of the bitbucket configuration to create a database and users, but we don’t have an example on hand for easy reference. I’m happy to add it to docs if you find a solution independently.

0 Likes

(Tim O'Brien) #3

Hi Emma,

Heads up that this was fixed in 2.1. Let us know if you have any other questions about anything.

Thanks,

Tim

0 Likes