Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

In Pipelines, Is it possible to use the same image for multiple steps ? Edited

Hey all, 

 

I have a repo that has a number of steps and the process is quick but before every step is pulls a new image even though it is the same. Is there a way I can pull the image once and run all steps/deploymets using the same image ? 

 

Thanks

1 answer

0 votes

Hey @Luiz Felipe Puccinelli Glingani

According to our documentation each step runs it’s own separate Docker container, which means that they must run in a different context for each step.

You can define a global image for your build, which will use the same image for your whole build, like this for example:

image: openjdk        #this image will be used by all steps unless overridden 
   
pipelines:
  default:
    - step:
          script:
        - npm install
        - npm test
    - step:      
        - npm install
        - npm test

Let me know if this helps!

Gabi

Hey Gabi

 

Thanks for your reply. I am using a global image already.

 

However, the biggest problem I have is that every single step will pull and clone a new image, even though is the same as the step before, and that slow down my release significantly.

 

I would love if I could pull/clone the image once and run multiple steps. 

 

Any suggestions ?

 

Thanks,

Luiz

Hey, @Luiz Felipe Puccinelli Glingani

As you can see in our Configure bitbucket-pipelines.yml doc, 'each step starts a new Docker container that includes a clone of your repository, and then runs the contents of your script section inside it. '

Which means that you can't use multiple steps here :( 

there are no updates for this feature?

Make sense if this can be an option as there would be many steps that can be removed between steps and be reused for a specific pipeline.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

442 views 4 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you