How can I control the runner name passed to "Tag" keyword using variable?

I have this pipeline where I frequently changes the runners on which my pipeline jobs run.

I use “Tag” keyword to specify the runner name on which the job should run. Now instead of giving the name of runner directly in the I want to pass a variable which will substitute my runner name for all the jobs having that runner name in tag.

Problem I am facing with this is if I pass runner like below, Gitlab tries to run my job on $BUILD_RUNNER instead of substituting the correct runner name for this variable.:

Can someone suggest a way to handle this? If I am able to achieve this I would be able to pass the runner name directly from schedule, instead of manually changing the code.

Hi @ashpratap007
variables are not supported in tags:. You can get around it by using Dynamic child pipelines and generate you CI file using soem script, but it has it’s ups and downs.

1 Like