Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Changesets condition with Fast-Forward

RazvanTodea14
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2024

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?  

1 answer

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 27, 2024

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events