How to run a job in detached mode in Gitlab?

Viewed 87

Can someone please tell me how to run a job in detached mode ? A job in my pipeline takes 30 minutes to complete, I want the pipeline to proceed without waiting for this job to complete.

For example:

stages:
  - build
  - build2
  - test
newservice:
  stage: build
  script:
    - echo "build is done"
newservice1:
  stage: build2
  script:
    - echo "build1 is done"
    - sleep 60
mygotservice:
  stage: test
  needs: ["newservice"]
  script:
    - echo "test is done"

I want the pipeline to proceed ahead without waiting for newservice1.

1 Answers

It depends on many reasons... running tests may take time. Where is the server? Where to get resources? There are many possible reasons and it is not just about the git...

Related