Docs - Clarify `only/rules:changes` modified paths for merge request pipelines
Problem to solve
The documentation is not clear about the behaviour of only:
or rules:
changes
for merge request pipelines. Customers raise support tickets regarding the only:
or rules:
changes
behaviour, as most often people expect that the changes are determined per commit (which it used to be), instead of the changes for all commits in the MR (as it is now).
Further details
Proposal
Recently I explained to a customer how the modified files are determined for merge request pipelines:
When using
only:changes
orrules:changes
for Merge Request pipelines, the list of modified paths for the pipeline is actually all modified paths for the Merge Request. Therules:changes
checks the paths defined in your rules against the list of modified paths.
And compared to branch pipelines:
Alternatively, when it's a branch pipeline, the push's modified paths are used for the comparison.
Who can address the issue
Other links/references
Commit that introduced the current behaviour: 30cd8432
MR for the commit: gitlab-foss!24490 (merged)
Docs released for the change in functionality: https://gitlab.com/gitlab-org/gitlab-foss/-/blob/8262eb083cfbb740de4615cf21bdd676cde5a381/doc/ci/yaml/README.md#using-changes-with-merge_requests
Current docs - it says rules:changes
acts like only:changes
:
https://docs.gitlab.com/ee/ci/yaml/#ruleschanges
Current docs - only:changes
with regards to MR pipelines:
https://docs.gitlab.com/ee/ci/jobs/job_control.html#use-onlychanges-with-merge-request-pipelines