Pipeline is running on all branches though should only be on master

Summary

All of steps in one of our projects should only be executed on master (.gitlab-ci.yml provided in section "Relevant logs and/or screenshots") but pipelines are executed on every branch we push to.

Steps to reproduce

Honestly, I don't know, because we are using the same Gitlab Runner for majority of our projects along with nearly identical configuration.

Other projects' CIs doesn't behave this way.

Actual behavior

Pipelines are starting after push to every branch.

Expected behavior

Pipelines are starting only after push to master branch.

Relevant logs and/or screenshots

stages:
  - build
  - deploy
  - cleanup

build:
  stage: build
  script:
    - omitted
  only:
    - master

deploy:
  stage: deploy
  script:
    - omitted
  only:
    - master

cleanup:
  stage: cleanup
  script:
    - omitted
  only:
    - master

Environment description

Using shell (bash) executor on Ubuntu 14.04.

Used GitLab Runner version

$ gitlab-runner --version
Version:      9.0.0
Git revision: 08a9e6f
Git branch:   9-0-stable
GO version:   go1.7.5
Built:        Wed, 22 Mar 2017 16:29:52 +0000
OS/Arch:      linux/amd64
Edited Jun 26, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading