Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I configure GitLab-CI to use shared runners when my main runner is not available?

Is it possible in gitlab-ci to run a job on different runners depending on the availability/busy of the runner? That is, I have a main runner that should do the main work, but in case it is busy or not available, I want shared runners to be used

I tried something like this, but the job was not executed as it was looking for a complete tag match

stages:
  - build
build-job:
  stage: build
  tags:
    - first-runner
    - shared-runner
  script:
    - sleep 150

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There is no way currently for you to specify that first use main runner and if its not there use the other runners. There are some open issues related to this in gitlab

runner priority

Boolean OR in runner tags

for now I think only thing you can do is add a common tag for all the runners you want and give that tag in the script.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading