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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

emanuel I'm New Here Nov 23, 2020

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.

emanuel I'm New Here Nov 29, 2020

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.

tomer-x I'm New Here Feb 04, 2021

Also need the current functionality 

Suggest an answer

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

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,323 views 0 3
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