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

Can we pass parameters/arguments to reusable step

Edited

We have steps that we are using for testing our python services.

The steps called 9 times and the only change inside the steps is the argument passed to our script

pipelines:
default:
- parallel:
- <<: *python-service-...1
- <<: *python-service-...2
- <<: *python-service-...3
- <<: *python-service-...4
...

 Can we pass an argument to one reusable step ??

Something like this:

pipelines:
default:
- parallel:
- <<: *python-test {...1}
- <<: *python-test {...2}
- <<: *python-test {...3}
- <<: *python-test {...4}
...
python-test: &python-test
step:
image: ...
name: Python Test - $SERVICE
script:
- source scripts/python_test.sh $SERVICE
artifacts:
- "**/$SERVICE-coverage.xml"

 

1 answer

You can definitely call a script from a step, and have it call the script with each of the arguments. But as for getting the pipeline to pass the argument and to perform the steps in parallel....not that I know of.

It won't help me to parallelize the flow, I will need to handle threads/processes inside the script.

In the case of pytest/pip, I don't want to handle threads.

Also need the current functionality 

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...

129 views 2 4
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