I'm defining custom services in my bitbucket-pipelines.yml.
But some of these services must use volumes in order to load an specific application configuration file for functional tests.
I tried this:
...
...
definitions:
services:
backend-api:
image: atlassian/pipelines-awscli:latest
script:
- eval $(aws ecr get-login --region ${AWS_DEFAULT_REGION} --no-include-email)
- docker run -d -v /opt/atlassian/pipelines/agent/build/cypress/backend-api-config:/config 123456.dkr.ecr.us-east-1.amazonaws.com/backend-api:latest
mongo:
image: mongo
is it possible? Or should I use docker-compose solution?
Hi Garry,
you can not have a script section as part of a service definition in Pipelines.
You could bake the commands you want to run into a custom docker image that you want to run as a service or simply run your docker run command as part of a step where you want to use it. To do that make sure to define "docker" as a service for that step.
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.