CI Job missing when using only: merge_requests
Summary
Using "only: merge_requests" in .gitlab-ci.yml for a stage make the job of the other stage not visible in the gitlab MR page.
Steps to reproduce
Use a .gitlab-ci.yml like this
stages:
- checks
- build
format:
stage: checks
script:
- echo "check"
build:
stage: build
script:
- echo "build"
only:
- merge_requests
And start a new merge request. The check job will not be visible in the MR page and it's falling will not prevent the MR to be accepted.
Example Project
What is the current bug behavior?
The non-"merge_requests only" stage are correctly run but not taken into account into MR pipeline.
What is the expected correct behavior?
Make the MR pipeline depends on non-"merge_quests only" stage
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 8.11 Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.3.3 Revision: ab531f31825 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://git.pixium.loc HTTP Clone URL: https://git.pixium.loc/some-group/some-project.git SSH Clone URL: git@git.pixium.loc:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 10.0.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 10.0.0 ? ... OK (10.0.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/1 ... yes 1/2 ... yes 1/3 ... yes 1/4 ... yes 1/5 ... yes 4/6 ... yes 4/7 ... yes 4/8 ... yes 4/9 ... yes 4/10 ... yes 4/11 ... yes 4/12 ... yes 4/14 ... yes 4/15 ... yes 2/16 ... yes 4/17 ... yes 4/18 ... yes 4/19 ... yes 4/20 ... yes 4/22 ... yes 4/23 ... yes 4/24 ... yes 2/25 ... yes 4/26 ... yes 18/27 ... yes 4/28 ... yes 4/30 ... yes 4/31 ... yes 3/33 ... yes 4/34 ... yes 4/36 ... yes 4/38 ... yes 4/39 ... yes 22/41 ... yes 22/42 ... yes 4/43 ... yes 4/44 ... yes 4/45 ... yes 22/46 ... yes 4/47 ... yes 4/48 ... yes 4/49 ... yes 17/50 ... yes 4/51 ... yes 4/52 ... yes 4/54 ... yes 4/55 ... yes 4/56 ... yes 4/57 ... yes 4/58 ... yes 4/59 ... yes 4/60 ... yes 4/61 ... yes 4/62 ... yes 3/63 ... yes 4/64 ... yes 4/65 ... yes 4/66 ... yes 16/67 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.0) Git user has default SSH configuration? ... yes Active users: ... 16 Is authorized keys file accessible? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished