GitLab Auto DevOps - how to select the runner it runs on?

197 views Asked by At

I've enabled auto DevOps on one of my projects. I enabled the project to use shared runners. Within that there are 2 runners, one that is a dind runner (with a dind tag) and another that isn't (runs a basic ubuntu image for other purposes, has no tags either). Now, my issue is that the Auto DevOps job defaults to that specific runner (the non-dind one), when I pause said runner it throws an error that there are no runners available for the job. Is there a way for me to tell Auto DevOps on which runner to run the job on? And if so how would I go about that? Alternatively, why would Auto DevOps default to that runner instead?

Thanks in advance!

1

There are 1 answers

1
sytech On BEST ANSWER

AutoDevops is basically just a predefined set of jobs. These jobs do not specify tags:. So, you have two options:

  1. Customize the AutoDevops jobs to include tags: for all the AutoDevops jobs you want to use a specific tagged runner OR
  2. Ensure the registered runner(s) you want to use for AutoDevops jobs is configured to run untagged jobs. Similarly, ensure any runners you do not want to use for AutoDevops are NOT configured to run untagged jobs.

The most likely reason for the runner behavior you're observing is because only one of your runners (or shared runners) are configured to run untagged jobs and the other is not -- resulting in the 'no available runners' warning when trying to run jobs that have no tags.

To effectively use AutoDevops without customizing each job, you need a docker-based executor. So, your non-docker executor(s) should NOT run untagged jobs and should require explicit tags.