[go: up one dir, main page]

Skip to content

Empty Pipelines with workflow rules and skipped ci

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Using workflow rules with push option ci.skip results in an empty pipeline. Any other commits/pushes without the ci.skip will not create a pipeline.

Steps to reproduce

Steps to Reproduce

  1. Create new project
  2. Commit Readme / .gitlab-ci.yml to repository
# .gitlab-ci.yml
image: alpine:latest

workflow:
    rules:
        # Create MR pipelines for MRs only
        - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
        - if: '$CI_PIPELINE_SOURCE == "push"'
          when: never

build:
  script:
    - echo "hello!"
  1. Make an additional change, commit, and push with git push -o ci.skip option

Example Project

Reproduced on Gitlab.com here: https://gitlab.com/davinwalker/skip-ci-empty-pipeline

Specific Empty Pipeline here: https://gitlab.com/davinwalker/skip-ci-empty-pipeline/-/pipelines/287814266

What is the current bug behavior?

Push creates an empty pipeline

empty

What is the expected correct behavior?

No pipeline created at all.

Workaround

The workaround is to not use the ci.skip push option

ZD Internal Ticket

Edited by 🤖 GitLab Bot 🤖