Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subsequent jobs in gitlab-ci

Tags:

Is there any way to run jobs from the stage in subsequent order? I've tried to do it with dependecies

job1:     stage:deploy ... job2:     stage:deploy dependencies:     - job1 

but it gives me an error "dependency job1 is not defined in prior stages". Is there any workaround?

like image 742
FanteG Avatar asked Mar 14 '18 14:03

FanteG


People also ask

How do I run two GitLab jobs parallelly?

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.

Which file is used to specify the jobs within the GitLab ci pipeline?

gitlab-ci. yml file is a YAML file where you configure specific instructions for GitLab CI/CD. In this file, you define: The structure and order of jobs that the runner should execute.

What does needs do in GitLab ci?

The needs keyword creates a dependency between two jobs regardless of their stage.


Video Answer


1 Answers

No. This is not possible by design. You will have to define more stages.

As the stages docs describe:

  1. Jobs of the same stage are run in parallel.
like image 111
Stefan van Gastel Avatar answered Sep 16 '22 13:09

Stefan van Gastel