Variable for short commit hash

Issue #18324 open
Pekka Wallenius created an issue

Enhancement proposal for adding env variable for short commit hash in Bitbucket Pipelines, for example BITBUCKET_COMMIT_SHORT.

I know this can be done manually in the pipeline but I would prefer a built-in solution that takes care of hash collisions.

I believe there are multiple use cases that could benefit from the short commit hash.

Comments (5)

  1. aneita staff

    Hey @peksipatongeis,

    Thanks for reaching out and for the suggestion. Out of curiosity, what is your use case for needing access to the short commit hash?


  2. Pekka Wallenius reporter

    Currently I'm using the commit hashes to tag Docker images (website releases) so I can do deployments to multiple environments building the image only once.

    The short commit hash doesn't really provide much on the technical side, machines can handle the long hashes well, but it's more of a convenience if and when developers run into these tags.

  3. aneita staff
    • changed status to open

    Thanks for the context!

    We're currently working on higher priority items so it's unlikely we'll get to this anytime soon. In the meantime though, I'll open this ticket to see whether other users are interested in seeing the same thing.

  4. Log in to comment