The original post was created on Stackoverflow, but I can not get the solution there.
Hope this forum is a better place to ask Gitlab related questions.
I tried to add
needs between jobs in the Gitlab CI configuration file, the code structure is similar to th e following.
stages: - build - test - package - deploy maven-build: stage: build only: - merge_requests - master - branches ... test: stage: test needs: [ "maven-build" ] only: - merge_requests - master ... docker-build: stage: package needs: [ "test" ] only: - master ... deploy-stage: stage: deploy needs: [ "docker-build" ] only: - master ... deploy-prod: stage: deploy needs: [ "docker-build" ] only: - master when: manual ...
I have used the GitLab CI online lint tools to check my syntax, it is correct.
But when I pushed the codes to trigger the CI pipelines, it always complains:
'test' job needs 'maven-build' job but it was not added to the pipeline You can also test your .gitlab-ci.yml in CI Lint
The GitLab CI did not run at all.