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