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?

Thank you

1 answer

  • answered 2021-06-23 12:07 danielnelz

    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"]