Services also get loaded on other steps

derekdhaas March 9, 2018

When having this pipeline

pipelines:
custom: deploy-directcore:
- step:
nameBuild
caches:
- node
script:
- bash build-script.sh
services:
-
docker
-
step:
name: Deploy
script:
-
sh publish-script.sh development

The service docker also gets loaded on the second step, adding another 20 seconds to the build time itself, is it possible without removing the service from the first step to solve this problem?

Step 1 without docker takes 1:30 to complete, with 1:20
Step 2: 0:40 without and 1:00 with

Any ideas? Both steps are using different images by the way, which is the reason I've splitted them in 2.

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hello,

Do you have the following in your bitbucket-pipelines.yml?

options:
docker: true

If so, that is the cause of what you're asking about. As that will always include the Docker service in all your steps.

Defining a docker service is now sufficient to load it into the step.

More information here: https://confluence.atlassian.com/bitbucket/run-docker-commands-in-bitbucket-pipelines-879254331.html

If that doesn't solve your issue, can you please include more of your YAML definition and a screenshot or two?

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events