Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Can parallel steps inherit the state of the previous step?

Im struggling with using steps to persist information/state.

I had assumed the parallel steps inherit their container from the previous step. This is correct, I can not get it to work.
If this, isnt correct doest that mean parallel steps, are meant to have lots of duplicate code (for example installing packages, and prepring envs to run tests etc..)

My current approach to have the first step run an ansible playbook - which provisions the container in pipeline similar to our local dev, and production envs.
Part of that process is configuring the mysql DB and downloading some dummy data for it to use, while also installing some other libs (awscli for example)
Finally it installs poetry so I can test our packages in this env, against the DB, before deployment.

But when ever the next steps (in parallel) "poetry is not found".
I added the artifacts: dist/** - from seeing an example elsewhere about preserving whats installed to the next steps, but that didnt work.
Have I miss understood the purpose of parallel steps here?

1 answer

0 votes
Caroline R Atlassian Team Nov 02, 2021

Hi, @AS

Thank you for reaching out to Atlassian Community!

First, I would like to explain how containers work. Your assumption was:

I had assumed the parallel steps inherit their container from the previous step.

Actually, for every step in the YAML file, a Docker container starts. The repo is cloned in that container, and then the script commands are executed. Then, the container gets destroyed. For the next step, a new container will start. So, if you install some tools in one step, they won’t be available in the next step. If you generate files in one step, they will only be available in the next steps if you define them as artifacts.

You mentioned parallel steps. Artifacts defined in a certain parallel step are not available in steps of the same parallel set. Only in subsequent steps that are not part of the parallel set.

I don’t know how this tool (Poetry) is installed, and whether simply defining as artifacts certain directories it generates will make it available in the next steps or not. So, if you could let us know how you do the installation, we can check this further.

Looking forward to hearing from you. 

Kind regards,

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,263 views 2 9
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