Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to "lock" group of jobs across multiple gitlab pipelines

Tags:

I have multiple jobs working with a single external resource (Server). The first job deploys the app to the environment, the second execute tests at this environment, third execute integration tests at this environment.

I know there is Resource group option. But it locks only jobs. If two pipelines run concurrently I need to execute job1, job2, job3 from the first pipeline, and only when the first pipeline release resource - the second pipeline can launch jobs1-3. Is there a way to achieve this? There are other jobs in the pipeline - they should work concurrently.

like image 798
Zufar Muhamadeev Avatar asked Jan 15 '20 05:01

Zufar Muhamadeev


People also ask

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 downstream pipeline in another project. You can visualize the entire pipeline in one place, including all cross-project interdependencies.

Do GitLab jobs run in parallel?

When there are many team members waiting on a running pipeline to finish to be able to make a contribution to the project, the productivity of the team takes a hit. GitLab provides a method to make clones of a job and run them in parallel for faster execution using the parallel: keyword.

Can 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.


1 Answers

This should be possible in 13.9 by using resource_group with process mode = oldest_first. Details available at: https://docs.gitlab.com/ee/ci/resource_groups/index.html#pipeline-level-concurrency-control-with-cross-projectparent-child-pipelines

like image 100
Zufar Muhamadeev Avatar answered Sep 22 '22 16:09

Zufar Muhamadeev