Search code examples
gitlabgitlab-cigitlab-ci-runner

GitLab do not run CI/CD pipeline when creating new merge request


My GitLab CI/CD is run when I:

  • click Create merge request
  • every commit in created branch
  • when merge request branch is merged to master

I would like to skip first pipeline (on creating merge request), because I would like to optimize (fasten) my CI/CD.
On creating merge request new branch is created from master which already build successfully. There is no point of running the pipeline again.

Can I do that? I already check documentation for when but no idea how to solve this.


Solution

  • I often use the option Create branch instead of Create merge request. This can only be done in the issue view. Then the first pipeline in this branch is running after the first push into the branch. With a push in the branch you can create a merge request.

    Create branch in issue view