Aashiq Parker
Aashiq Parker

Reputation: 807

Gitlab pipeline jobs in the same stage are not running in parallel

We have 4 deploy jobs in the same stage that can be run concurrently. From the Gitlab docs:

The ordering of elements in stages defines the ordering of jobs' execution:

  1. Jobs of the same stage are run in parallel.

  2. Jobs of the next stage are run after the jobs from the previous stage complete successfully.

What happens, however, is that only one of the jobs run at a time and the others stay on pending. Is there perhaps other things that I need to do in order to get it to execute in parallel. I'm using a runner with a shell executor hosted on an Ubuntu 16.04 instance.

Upvotes: 10

Views: 12316

Answers (2)

I also ran into this problem. I needed to run several tasks at the same time. I used everything I could find (from needs to parallel). however, my tasks were still performed sequentially. every task I had was on standby. the solution turned out to be very simple. open file /etc/gitlab-runner/config.toml concurent for the required number of parallel tasks for you. enter image description here enter image description here

Upvotes: 0

ilia
ilia

Reputation: 1132

Your runner should be configured to enable concurrent jobs( see https://docs.gitlab.com/runner/configuration/advanced-configuration.html)

concurrent = 4

or you may want to setup several runners.

Upvotes: 23

Related Questions