Ultimately, this pipeline is a triggered pipeline from other repositories so I would like to have more flexibility in terms of running the jobs in parallel depending on the codebase’s pipeline running.
No, we cannot use variable interpolation for parallelism and only option here is to use dynamic pipeline where you can use environment variable to define the parallelism for the pipeline definition which will be uploaded using the dynamic pipeline process.
I transferred the CI steps into the yaml file instead but I still get an error on the yaml file that its expecting an integer.
On my pipeline.yaml file, both these gives me the ‘integer’ error:
steps:
- label: 'Run tests'
commands: 'make run_tests'
parallelism: ${PARALLEL_RUN} # integer value tried to be passed from CI variable
As mentioned in the earlier reply, we cannot use variable interpolation for parallelism. Therefore, the suggested use of YAML anchor/alias will still give you the same errors.
Hi @lizette Thanks. Would you know if it only recognises a shell script?
Instead of using a shell script (pipeline.sh), we are using a Makefile. I tried to include it with the following:
The example you provided will just echo the steps into the terminal. The steps won’t be executed by the Buildkite Agent as you would expect. I believe the only way to do this is to create a YAML file, pass it on to the agent and use the buildkite-agent pipeline upload command.