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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still no solution for this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any news ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just in case someone needs this, I was looking for the way to get list of changed files on a pull-request trigger:
git diff --name-only origin/${BITBUCKET_PR_DESTINATION_BRANCH}..origin/${BITBUCKET_BRANCH}
Please note that this will not work for "tag" trigger or custom pipelines because BITBUCKET_BRANCH is not set
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.