Search code examples
gitlabcontinuous-integrationgitlab-ci-runner

Avoid Duplicate CI Pipelines on GitLab


Some additional stages in my CI pipeline like release-test and release are triggered if I push a tag with a specific keyword release. The problem is that the CI pipeline first runs for the branch and then repeats the first three steps for the tag push. Is there any way to avoid this duplication and run only the tag pipeline?


Solution

  • while pushing the tag and the commit I was using:

    git push && git push --tags

    To skip the ci pipeline for the commit, I used:

    git push -o ci.skip && git push --tags

    This solved the problem for me with duplicate ci runs.