Multiple pipelines for one commit?

Viewed 1573

When I commit changes to the gitlab repo, I expect that the one pipeline is triggered which ideally should run all my specified jobs but that's not the case. 4 pipelines are created everytime. I have only one runner, that is docker and has 3 tags: build, deploy, test.

I simplified the file below but still can not figure out where the problem is.

.gitlab-ci.yml

image: alpine:3.8

some_job:
 tags:
  - test
 script:
  - echo "Test passed"

4 pipelines! for just 1 commit. Why not just 1 pipeline because all pipelines are doing the exact same work. enter image description here

2 Answers

define 1 stage in stages and define your job with that stage as below

stages:
  - test

testdeploy:
  stage: test

I was seeing the same issue on my on premise GitLab server (12.7.5). My issue was that I had an invalid (outdated) runner tag on one of my stages.

Double check that you've got a runner that will work with that project and that "test" tag.

Related