3

I try to use Gitlab-CI and create the runner, but when jobs start, the job with the needed runner doesn't start:

enter image description here

But this runner exists in the list:

enter image description here

How to use a runner?

And an additional question: all works fine with the "automatic" runner when I only create .yml file. Why do I need to create some other runners and why runners needed?

2 Answers2

3

Runners are machines (typically containers) where your jobs run. Gitlab offers shared runners, and you can also bring in your own runners (machines that you register against Gitlab to run your jobs).

The main difference between Gitlab shared runners and the ones you bring is that the shared runners are, well, shared, so sometimes you have to wait for a bit for a job to start. You can also bring more powerful machines so that your jobs run faster. You can find some docs on runners here.

In your case it seems that the runners have a problem, looking at the exclamation sign next to the name, which should be a green ball. Maybe hovering over the sign will give you some clues into what's happening.

migueldavid
  • 246
  • 1
  • 3
3

After Further research, I found an open issue on gitlab pretty similar to mine. They describe runners freshly created and unable to pick up jobs. As for my use case, The runner was created but with warning stating "New Runner, has not connected yet".

In order to further check the status of the runner, I went to my terminal on the machine where I installed and registered the runner, namely my mac book pro, and I ran the following command:

sudo gitlab-runner verify

enter image description here

In the settings of the project, the runner's status switches to "Online" as you can see below, with a green label:

enter image description here

As a result, the project's pipeline status went from "Pending" to "Running"

enter image description here

Nevertheless, while the change of pipeline status, from "pending" to "running" thanks to gitlab runner's status going "Online", the associated CI build Job Status is still stuck at "Pending". This means that gitlab runner, even with all its characteristics looking fine, fails to pick up the job he's supposed to. enter image description here

I'm aware this is not really a pure answer with final solution but I hope this will help move things forward on this topic !

phgolard
  • 31
  • 2
  • 1
    Hi @phgolard, while this may lead to more research, information into this particular issue, this is not a constructive answer for this question. I would recommend if you would like to post this answer as a separate question if it is something you are looking to gain answers on. – Preston Martin May 19 '21 at 20:57
  • @PrestonMartin thanks a lot for your advice. I am sorry while I've been "consuming" stackoverflow for a very long time, this is one of my first posts. You are right that I would be happy to get some answers/reactions on that, but intuitively I put it as an answer to the initial question since this is how things happened: I asked the question, I made further investigations which I found relevant so I shared them to move things forward and I did not know what would be the best: replying to my own question or creating a new one with additional pieces of information. I'll take note of this! Thx – phgolard May 20 '21 at 22:14
  • While starting a new question may be the right answer, it is also fine to append additional research to your existing question. An edit will send it to the top of the main page and usually get you some extra eye balls that you didn't have before. – chicks May 20 '21 at 23:38