Pipeline not skippable in merge request

Hi everyone,

I’m trying to create a skippable pipeline in a merge request and can’t seem to get it to work. With your help I’d like to figure out if it’s a bug or something I can improve. Thanks!

Problem to solve

We have multiple test pipelines running in case of creation/ modification of a merge request. We’d like to able to optionally skip some of them and still be able to merge. In order to achieve this we activate Skipped pipelines are considered successful in the project settings. When creating the merge request however, the merge remains blocked if one of the test pipelines has been skipped. So the skipped pipeline setting seems to be ineffective.

Steps to reproduce

  • Change project settings:
    Settings → Merge requests → Merge checks → Pipelines must succeed → Skipped pipelines are considered successful
  • Set up .gitlab-ci.yml with two pipelines in the test stage that are triggered by merge request creation
  • Create merge request and skip one or both of the tests
  • Merge request will insist that all pipelines need to run successfully

Screenshot from 2024-08-30 11-50-03

Configuration

This is a sample extract of .gitlab-ci.yml configuration that reproduces the behavior:

image: docker:latest

stages:
  - test
  - publish
  - deploy

.unittest:
  stage: test
  script:
    - ./run_some_tests

unittest:
  extends: .unittest

unittest_full:
  extends: .unittest
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
  variables:
    ACTIVATE_EXTRA_TEST_OPTIONS: 1

publish_docker:
  stage: publish
  only:
    - master

Versions

Hi,

You might be mixing up canceled and skipped → I believe this is not the same. As far as I see, your pipeline is canceled, not skipped, and therefore Merge is blocked.

1 Like

Good point! Thanks! Then it seems what we want to do is not possible…