CI pipelines are running 'only: branches' jobs for tags [master]
Summary
On the latest gitlab nightly, running on dev. We noticed that our tag jobs were not being run when tags were created/pushed. Rather the pipeline that was triggered was running jobs that were configured to only run for branches.
Our gitlab-ci yaml can be seen here: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/.gitlab-ci.yml
Steps to reproduce
Using the lastest gitlab master:
- Create a .gitlab-ci.yml with jobs for branches using the only syntax (in omnibus-gitlab we are using the
branches@reponame
syntax) - Add additional jobs for tags using the only syntax (we are using the tags@reponame syntax)
- Create a new tag
The branch jobs will run instead of the tag jobs.
Example Project
Our omnibus-gitlab project was encountering this behaviour using the nightly. Our gitlab-ci.yml can be found here: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/.gitlab-ci.yml
One thing to note, is that we have two sets of tag only, and branch only jobs, that differ by reponame. (One set runs on gitlab.com, and the other on dev)
What is the current bug behavior?
Branch jobs are being run instead of the tag jobs.
What is the expected correct behavior?
Only the tag jobs should be run.