Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to retrieve the commit hash of last pushed commit?

Saurabh Deep
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!
December 12, 2018

Hi,

BITBUCKET_COMMIT gives my the commit hash of the current commit that has kicked off the current build. For my use case, I require the commit has of the commit that was pushed the last time before the current commit.

In Gitlab, the same is available with the CI variable `CI_COMMIT_BEFORE_SHA`. Is there something similar in Bitbucket Pipelines or any way to figure it out?

Appreciate any ideas here... Thanks!

Saurabh

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events