Only one GitLab CI Runner Building

I recently installed GitLab and am trying to use GitLab CI. I successfully enabled GitLab CI on my GitLab server and successfully installed CI Runner (on Windows, if relevant). I turned on the Windows CI Runner project, and when I commit the repository, the runner runs and I see the assemblies.

I installed the second CI Runner (on Debian) after the documentation. I see that Running CSI Run Debian is registered with Windows CI Runner. Running CSI Debian has the same project that is assigned to it. However, when I commit the repository, only the Windows CI Runner runs, the Debian CI Runner does not try to create.

What error did I make or what additional configuration can I enable? I have already tried re-registering the Debian CI Runner without success.


Update 1: The Debian CI server is starting up, but the Windows CI Runner is not. It seems that he chooses only one participant.

Update 2: Updated to 'GitLab CI 7.14.1 2dee1b3', but the same behavior persists.

Update 3: Added third runner on Scientific Linux machine. It is registered and assigned to the project, but only one runner is running (currently the Debian CI Runner).


GitLab CI 7.12.0 e96755c

+7
git gitlab-ci gitlab-ci-runner
source share
2 answers

When the build for gitlab CI starts, it will run the tasks specified in the .gitlab-ci.yml file. Think that these tasks are independent parallel steps in your assembly. These tasks are performed by any available runner who is able to complete this work. However, when I think that you are managing to complete the task only once, and the first runner available. Think of runners as a resource pool, not build steps. Having multiple runners allows you to complete tasks in parallel.

If you have one task that you want to complete each runner each time, try using tags. For example:.

job1: tags: - windows script: - job command 1 - job command 2 job2: tags: - debian script: - job command 1 - job command 2 

Where job command 1 and job command 2 etc. These are the steps you want your work to do, and windows and debian are the tags you assign to your runners. Basically, you just create the same tasks with different tags, one task for each runner. Then you need to make sure that every runner has a tag that you specify for your work. You can do this by editing the runner in gitlab CI.

  • Go to Runners
  • Scroll down to "Runners Activated for this Project"
  • Click on the edit symbol.
  • Add tag to runner
  • Click "Save."

Read more in the gitlab YAML readme

+7
source share

It is distributed as source code or as a simple omnibus package for installation on one of the supported Linux distributions. However, there are some areas in which it is quite difficult to use, and one of them:

  • A runner can only run one at a time. If you want to run more, either you created a new server or created an additional user to create tasks.

Try using Docker.

It is important that every time you build your project, it runs in a clean environment without any remnants of previous versions. With a few simple commands, you don’t need to install any dependencies, because Docker will download everything you need to run your tests.

Hope this helps.

0
source share

All Articles