Select executor type based on job tags
Is your feature request related to a problem? Please describe.
Some pipelines use more than one runner type, for instance docker on build and shell on deploy, or a build for macOS and another for Linux.
The gitlab-runner daemon itself supports declaring multiple runners on the same machine and jobs are distributed based on tags.
Describe the solution you'd like
In order to mimic the behavior of distributing the jobs from a pipeline to multiple runners the user would set a set of mappings of tag->executor_type.
It may be useful to implement some defaults based on common usage patterns. From the official documentation we get examples such as:
dindfor docker-in-dockermacos,saas-macos-medium-m1,saas-macos-large-m2profor shell on macOSshellfor shell on Linux
Describe alternatives you've considered
A workaround for this is to not run the pipeline all at once but rather "micro-manage" each step so the correct executor can be enforced.
Additional context Add any other context or screenshots about the feature request here.
I'm not sure I understand how this would benefit your local flow Please attach a good example that illustrates problems that this feature would address.
Hi, it will also help me in my case : I have a .gitlab-ci.yml which has build stage for both OS: windows and linux and the only way to differentiate the jobs are tags :
build:windows-shared:
stage: build
tags:
- win10
- build
script:
- cmake.exe -S . -B CI -G "Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" -DBUILD_SHARE .....
- cmake.exe --install CI --config Release
- cd CI
- ctest.exe --output-on-failure -C Release
artifacts:
paths:
- CI
expire_in: 2 hour
build:ubuntu-static:
stage: build
tags:
- ubuntu
- build
script:
- cmake -S . -B CI -DCMAKE_BUILD_TY ......
- cd CI
- ctest --output-on-failure -C Release
artifacts:
paths:
- CI
expire_in: 2 hour