getting last commit before push of a specific build Edited

Hi,

sometimes when working a user accumulates multiple local commits before pushing to the origin.

in that case, BITBUCKET_COMMIT will only point to the last one.

is it possible to somehow get the range of commits that triggered the build?

it is necessary for my team in order to determine which services changed during the last update and only build them.

 

in addition to that, better support for mono-repos could be really great.

Thanks!

1 answer

Ough, sorry, I thought this is discussion, not answer, so don't treat my post as answer please.

 

It's not totally correct heading of question. It's not commit range is required but the last commit hash BEFORE push happen.

So, idea is to check, manipulate only with files newely delivered by push triggered build. To be able to use something like `git diff --names-only ${BITBUCKET_PREVIOUS_COMMIT} HEAD`. Such functionality is highly demanded for CI server. Thanks.

I am looking for exact the same functionality!

Not only are you guys looking for this, it's also here https://community.atlassian.com/t5/Git-questions/Is-there-a-way-to-get-the-range-of-comits-pushed-to-a-pipeline/qaq-p/610323.

 

I find it kind of strange that Bitbucket Pipelines doesn't already have this functionality. I mean Travis CI has it (`TRAVIS_COMMIT_RANGE`), CircleCI somehow has it too and even Jenkins has something for this... I really prefer to stick with Pipelines to have an all-in-one power repo, but this kind of things really makes you think about using others...

Still no solution for this?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,414 views 9 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you