Dynamic behavior on parallel:matrix
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
It would be very handy to dynamically control the number of jobs run by the parallel:matrix
.
Proposal
Make the list of values one can specify in the matrix keyword interpret variables presented.
Use Case
Let's say I have a CI/CD job that reads specific configurations and accesses some API's. Then the job results in an array of - let's say service name - which shall be passed to the next job that is a parallel:matrix
job.
Depending on the resulting list of the previous job, the matrix should be constructed dynamically.
Wanted functionality
Perform the same job with the same behavior on different types of environments. Variables presented shall be interpreted.
Service Related Job:
stage: release
needs:
- job: Prepare
artifacts: true
parallel:
matrix:
- MODULE_NAME: ${NAMES_AS_LIST} # the variable NAMES_AS_LIST comes from the `dotenv` artifact of the `Prepare` job
ONE_VAR: "bar"
ANOTHER_VAR: "baz"
script:
- echo $MODULE_NAME
Edited by 🤖 GitLab Bot 🤖