Hello team!
currently we are facing a weird behavior. Although the documentation says that all commits are taken into account when evaluating the pull request files, it is currently using only the last commit.
I just figured this out because we use conditions for all our steps, after updated the bitbucket-pipelines.yml file, all steps were skipped (which does not make sense because several conditions passes). The way to get expected steps executed is to squash all pull request commits into one.
Sorry if this is not the best place to ask / report.
Hi Cristian,
Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! Welcome to the Atlassian Community!
I would like to inform you that this is a good place to ask/report.
Can you let me know what's in your bitbucket-pipelines.yml configuration, please? With this configuration which I have, the builds were executed correctly and even the previous commits were taken into account:
image: atlassian/default-image:3
pipelines:
pull-requests:
'**': #this runs as default for any branch not elsewhere defined
- step:
script:
- echo "test"
condition:
changesets:
includePaths:
- "potato/*.xml"
Please let us know, we're here to help.
Best Regards,
Norbert
Atlassian Bitbucket Cloud Support
Hi Norbert, nice to meet you too!
the configuration you asked is:
image: node:12.22.6
Thanks for checking
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have also check this doc piece, but didn't find anything relevant as we are just using an official image.
Let me know what other info can I provide to tackle this!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI - I have updated the main pipeline image to use the one in your example and did not fix the behavior (it is still using only the last commit, skipping all the steps)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cristian,
I've only received the image:XXXXXX part from your configuration, would it be possible for you to post the whole bitbucket-pipelines.yml file (masking the confidential information)? I'd like to review your configuration as it would help me figure it out, what could go wrong.
Thank you!
Best Regards,
Norbert
Atlassian Bitbucket Cloud Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey Norbert,
when reducing our pipeline to the minimum (and comparing each thing with documentation) I realize we are using 'branches' in pipelines instad of 'pull-requests'.
Thx for reaching out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome Cristian, I'm glad to hear your issue is resolved :)
Have a good day ahead and stay safe!
Best Regards,
Norbert
Atlassian Bitbucket Cloud Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know it is an ancient ticket, but this was what google returned on search, so it might help others.
We are using merge commit strategy (git merge --no-ff)
I am wondering what does it exactly mean that only the last commit is considered on branches.
If I have a setup where the only way to get new stuff to develop is through PR, when the PR is open I can act depending on what was changed.
Now when this PR is merged to develop (without squasing) will my changeset condition evaluate ALL changes or just the last commit from the whole PR?
To clarify what I am trying to achieve:
I have a repo which contains 5 different microservices that are working together. They make sense only together so they are in a single repo.
Now depending whenever the change is in service1 folder or service2 folder ... or common folder, I want to rebuild only the services which are affected by the change.
So if I have PR with 3 commits being merged to develop, can I use changesets with includePath to detect what I need to rebuild (let's assume that each commit affects different service)?
Do I understand correctly that this will work only when my merge strategy is --no-ff or --squash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.