Backend: `rules:changes` ignores force push event
Summary
I tried to use rules:changes
config https://docs.gitlab.com/ee/ci/yaml/index.html#ruleschanges for parent-child pipeline.
This works well, the child pipeline is run on push when something changes in dir
folder.
But on force push it is skipped (git push -f
). That is kind of a critical issue when e.g. tests should be run to detect issues in changes.
Steps to reproduce
Child:
stage: s1
trigger:
include: dir/.gitlab-ci.yml
strategy: depend
rules:
- changes:
- dir/*
- Push something to opened PR so the child pipeline is run and the pipeline is green
- Break code
- Commit amend
- Force push
- the pipeline is still green
What is the current bug behavior?
Pipeline is NOT run on force push
What is the expected correct behavior?
Pipeline is run on force push
Results of GitLab environment info
GitLab Enterprise Edition 14.1.0-ee
Possible fixes
Run child pipelines on force push because it might have changes the contents
Edited by Mark Nuzzo