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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.