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,560,443
Community Members
 
Community Events
185
Community Groups

How to create a 'n' no of parallel step based on user input ?

Edited

i have one parameter called number_of_org that is used to create n number of scratch org parallely .how based on the user input for eg:if 4 i want to create run commands that create 4 scratch parallely .
so , i want to create n no of step that run parallely?

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 02, 2023

Hello @oboe_ada ,

Welcome to the Atlassian Community!

My understanding of your requirement is that you would like to programmatically generate pipelines parallel steps based on the user input. I'm afraid this is not currently possible in Bitbucket Pipelines.

One option, in case you need to repeat sections of your yml file, is to use YML anchors. With anchors, you can define a "template" of the step and can re-use it multiple times in the rest of your YML file : 

definitions: 
  steps:
    - step: &build-test
        name: Build and test
        script:
          - mvn package
        artifacts:
          - target/**
 
pipelines:
  branches:
    develop:
      - step: *build-test
    main:
      - step: *build-test

 In the example above we are defining an anchor step named build-test which acts like the "template", and then we can reference it in the pipeline definition multiple times without having to repeat the entire step's code.

For more details about how to use anchors, you can refer to our documentation YAML Anchor - Bitbucket Pipelines.

Thank you, @oboe_ada !
Patrik S

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events