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
More on GitLab CI
How does GitLab CI/CD work at a high level?BeginnerWhat is a GitLab Runner and what executors exist?IntermediateWhat are the types of runners (shared, group, project) and tags?IntermediateHow do `rules:` work and how do they replace `only/except`?IntermediateWhat are workflow rules and how do they prevent duplicate pipelines?AdvancedHow do artifacts and cache differ in GitLab CI?Intermediate