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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,554,378
Community Members
 
Community Events
184
Community Groups

is it possible to dynamically create parallel steps based on artifact of previous step?

We have a monorepo and need to be able to build multiple containers in parallel. However, how many we need to build will change each time to pipeline is run. so I have the following logic:

 

generate list of containers to build --> generate parallel steps --> run the parallel steps

pseudo-code

pipelines:  default:      
step:          
script:          
generate list of changed services          
artifact:          
the list      
step:        
script: create parallel steps    
parallel:        \
stepbuild container #1        
stepbuild container #2

 

is this possible in bitbucket pipelines?

2 answers

1 accepted

0 votes
Answer accepted
Justin Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 15, 2021

@Eytan Yammer Currently Bitbucket Pipelines doesn't support dynamic parallel steps. Are the max containers a constant? If that is the case, I would suggest having a step for all the containers and skipping them if it's not required to build the container based on the artifact. 

Thanks. For the time being the number of container won't be changing every day but it will be growing steadily over the next several months. 

 

What I've decided to do was the following. 

 

pipelines:  default:    

parallel:      

   - step:         

      nameBuild container1

   condition:

    changesets:                

      includePaths:

        - path/to/container1/code/**

   - step:         

      nameBuild container2

   condition:

    changesets:                

      includePaths:

        - path/to/container2/code/** 

 

this will have to do for the time being. Thanks for the help. 

Like Justin Thomas likes this

This was answered two years ago. Is there any change in Pipelines since to support this? We have a growing number of tests and manually managing splits to keep PR build times reasonable is unwieldy, to say the least.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events