Jobs without "only:[merge_requests]" are not planned in merge-request pipelines

Summary

Since one job is defined with only:[merge_requests], other jobs aren't plan for merge-request pipeline if they don't have explicitly the same conditions.

Steps to reproduce

Create a .gitlab-ci.yml with two jobs : one is "only: merge_requests", the other is not.
Now create merge request: only the job with "only" keyword is planned and run in pipeline.

Example Project

https://gitlab.com/gitlab-cd/sandbox

What is the current bug behavior?

merge-request pipeline plans only one job, here "deployer".

What is the expected correct behavior?

merge-request pipeline should plan the two jobs, here "builder" and "deployer".

Relevant logs and/or screenshots

Use the following pipeline definition :

stages:
- build
- deploy
builder:
    stage: build
    script:
    - echo "First, i'm building..."
deployer:
    stage: deploy
    script:
    - echo "And now, i'm deploying..."
    only:
    - merge_requests

Durring merge request, "builder" job is missing, only the "deploy job" is plan for running: image

This is what i would expect (both "builder" and "deployer" are planned for execution): image

I can get back to this proper situation thanks to a workaround described bellow.

Output of checks

This bug happens on GitLab.com

Workaround

I add the following to all jobs with no except/only policy by default

only: [branches,tags,api,external,pipelines,pushes,schedules,triggers,web,merge_requests]
Edited Dec 20, 2018 by x4v13r
Assignee Loading
Time tracking Loading