I have the following bitbucket-pipelines.yaml configured in my repository:
pipelines:
default:
- parallel:
- step:
name: Test API v1
caches:
- pip
script:
- make test-api-v1
services:
- mysql
- postgres
- redis
- step:
name: Test API v2
caches:
- pip
script:
- make test-api-v2
services:
- mysql
- postgres
- redis
definitions:
services:
mysql:
image: mysql:5.6
environment:
MYSQL_DATABASE: 'test'
MYSQL_USER: 'test'
MYSQL_PASSWORD: 'test'
MYSQL_ROOT_PASSWORD: 'test'
postgres:
image: postgres:9.5
environment:
POSTGRES_DB: 'test'
POSTGRES_USER: 'test'
POSTGRES_PASSWORD: 'test'
redis:
image: redis
I want to know what is the behavior of the services at each parallel step. Will each step get its own instances of these services? Or will they share the access to the same services instances?
Thanks
Thank you for sharing the bitbucket-pipelines.yml file.
Each service will have its own container. Services from the same step are linked to the build container for that step, therefore having the same scope of ports.
In your case, the services are in different steps which means that the second step will not use the same services as the first one.
I hope that answers your question.
Let me know if you need more clarification.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome! =]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.