GitLab: How to Execute 1 Job per Runner Only

Viewed 60

We are currently implementing Test Execution of Test Suites using Gitlab's CI.

One of the issue we encountered is that it keeps using a runner even though it is being used by another job.

Problem 1:

  • There are 3 available runners (different machines), config is already set to limit = 1 and request_concurrency = 1.
  • Pipeline with 3 jobs running in parallel will be triggered.

Result: The 2 jobs will use 1 runner.

Expectation: The 3 jobs will use the 3 runners (1 job per runner).


Problem 2:

  • Given the above conditions.
  • Pipeline with 3 jobs running in parallel will be triggered twice.

Result: almost all jobs are running, executing multiple jobs in a runner.

Expectation: First pipeline should be running (1 job per runner) and second pipeline should be pending.
Second pipeline's job/s will only be executed once done with first pipeline's job/s

1 Answers

You must set concurrent to 1 in the global settings.

Also double check your configuration file to ensure you have not registered multiple runners on the same machine.

Related