Urago
Urago

Reputation: 47

GitLab - dont wait for all jobs in the previous stage to be finished

In my pipeline, the two last stages are Deploy and Qa-test. It look like this: pipeline now

Now I need to run integration-tests automatically when the deploy-stag job is finished and not to wait for deploy-prod.

Is there some way to do this?

Upvotes: 0

Views: 2374

Answers (1)

danielnelz
danielnelz

Reputation: 5136

You can use needs to create an direct acyclic graph. If your integration-tests job needs the deploy-stag job, it will immediately start after deploy-stag is finished and will not wait for the remaining jobs in the deploy stage.

integration-tests:
  stage: qa-tests
  script:
    - echo "running qa tests"
  needs: ["deploy-stag"]

Upvotes: 1

Related Questions