Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 527
Amposter Avatar asked Oct 19 '17 10:10

Amposter


People also ask

Do GitLab stages run in parallel?

Fortunately, GitLab CI provides an easy way to run a job in parallel using the parallel keyword. In the background, this creates "clones" of the same job, so that multiple copies of it can run simultaneously.

Can a GitLab runner run multiple jobs?

One way to allow more jobs to run simultaneously is to simply register more runners. Each installation of GitLab Runner can register multiple distinct runner instances. They operate independently of each other and don't all need to refer to the same coordinating server.

Can you have multiple pipelines in GitLab?

You can set up GitLab CI/CD across multiple projects, so that a pipeline in one project can trigger a pipeline in another project. You can visualize the entire pipeline in one place, including all cross-project interdependencies.

Why pipeline is failed in GitLab?

It might be a security vulnerability The code in your most recent commit could be vulnerable, or a dependency could be at risk, either of which would trigger a failed security test and thus a failed pipeline.


Video Answer


1 Answers

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.

like image 114
ilia Avatar answered Oct 19 '22 11:10

ilia