Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Share containers across steps/pipes

I have a pipeline setup which successfully builds my docker image using compose, starts the containers using compose, runs tests on it, and then pushes it out to remote repository.

I am now trying to add in another set of tests, the code for which is a completely separate repo on Bitbucket. Initially I tried doing git clone and running the code in the new repo against the local running containers, but kept running into issues of git, ssh, npm not being available in the "image:docker/compose".

What I would like to do is:

step1:
- build image, and start container
step2:
- run tests within the original repo
step3:
- clone in the secondary repo, and run its code against containers from step1
step4:
- push image out

Is this possible? Sharing containers across steps? Or would it be possible using pipes?

1 answer

0 votes

@Kunal Gupta looks like you need the test image for you. Look at the doc how to use custom images here https://support.atlassian.com/bitbucket-cloud/docs/use-docker-images-as-build-environments/

Regards, Galyna

@Halyna Berezovska  I am already using a custom image

 

   image: docker/compose

 for steps 1 and 2 (which are currently just 1 combined step to build docker image and run tests).

 

Are you saying that I use the docker container generated in step1 as in image in the following steps ? Something like

step1: 
- build image
step2:
image: image-from-step-1
- run tests
.
.
.
etc ...

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

209 views 2 5
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