Skip to main content
bash TV

GitLab CI Stages vs needs: Stop Jobs Waiting (YAML Inside)

TestMu AI (Formerly LambdaTest)

5 views5 Dec 2026

YouTube

GitLab CI stages run in order; needs lets a job start the moment its real dependencies finish. Copy the YAML for stages, needs, needs: [] and dependencies. Stages run in sequence and the jobs in a stage run in parallel, so lint and unit tests can sit waiting on a slow docs build they never use. In about 90 seconds we watch that wait in a pipeline graph, fix it with needs: ["build-app"] and needs: [], compare needs with dependencies, and then fix the case needs can't: one long test job. Split it with GitLab parallel, or run it as one HyperExecute job from TestMu AI (formerly LambdaTest) that autosplits tests across VMs while your stages stay the same. Chapters 00:00 Why your pipeline waits · Step 1: stages 00:23 The wait in the graph · Step 2: needs 00:43 Step 3: needs vs dependencies (and why one job stays slow) 00:56 Step 4: split the slow test job with HyperExecute 01:12 The STAGE checklist YAML shown stages: [build, test, deploy] (list order = run order) unit-tests: needs: ["build-app"] lint: needs: [] dependencies: [] / needs:artifacts: false parallel: 4 (CI_NODE_INDEX / CI_NODE_TOTAL) hyperexecute-e2e: stage: test, needs: ["build-app"], ./hyperexecute --user "$LT_USERNAME" --key "$LT_ACCESS_KEY" --config "$HYPEREXECUTE_CONFIG" hyperexecute.yaml (abridged): runson: linux, autosplit: true, concurrency: 4, testDiscovery (type: raw, mode: remote, command: grep -rl 'def test_' tests/), testRunnerCommand: pytest $test GitLab behaviour checked against GitLab's docs (GitLab 19.7) on Dec 5, 2026. Full guide (failure rules, .pre/.post, manual gates, troubleshooting): https://www.testmuai.com/blog/gitlab-ci-stages/ HyperExecute: https://www.testmuai.com/hyperexecute/ GitLab + HyperExecute docs: https://www.testmuai.com/support/docs/gitlab-integration-with-hyperexecute/ #GitLab #CICD #DevOps

Join the discussion

Have something to add?

Sign in to reply, follow this thread, and earn XP when your answer helps someone.