What does `needs:` do and how does it create a DAG pipeline?

IntermediateConceptGitLab CI
Answer

By default a job waits for every job in all earlier stages. needs: [job_a] lets a job start as soon as its listed jobs finish, regardless of stage, so independent chains do not wait on each other and pipelines get faster. needs: [] makes a job start immediately.

integration-test:
  stage: test
  needs: [build-api]
  script: ./run-it.sh
All CI/CD questions Roadmap: GitLab CI/CD

More on GitLab CI