We have a step in our pipeline to run the seed data only in case some files changed under the seed directory.
The pipelines run based on the branches (release, staging, master). Everything works as expected if the merging strategy of the PR is squashed. (squash feature-branch -> release, squash hotfixbranch -> staging), but in case the merging strategy is fast-forward (fast-forward release -> staging) the changes under the seed directory are not detected and the run seed step is skipped.
Am I missing something here or this is expected behavior?
Hi @RazvanTodea14 and welcome to the community!
This is expected behavior only if the last commit of the source branch does not include any changes in the seed directory.
In a pull-requests pipeline, all commits are taken into account, and if you provide an includePaths list of patterns, the step or stage will be executed when at least one commit change matches one of the conditions. For other types of pipelines (including the branches pipelines), only the last commit is considered.
With the squash merge strategy, the commits of the source branch are squashed into one, and if that commit has changes in the seed directory the pipeline will run. However, if you have multiple commits merged into the destination branch with the fast-forward strategy, only the changes in the last commit will be taken into account. Please see our documentation here:
We have a feature request to take into account all commits:
You can add your vote to it if you'd be interested in that feature.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.