-
Suggestion
-
Resolution: Won't Fix
I'm using pact (tool for contract-testing) and variable BITBUCKET_COMMIT in Bitbucket pipelines for define versions of my app.
Faced with different behavior when using "pull-requests" stage.
Cloning code for "pull-requests" has shortened commit SHA then other stages (branches, default).
Steps to reproduce:
- Create bitbucket-pipelines.yaml(image: atlassian/default-image:2) with "default" and "pull-request: stage
- Run stages
- See Build setup
Example for default stage(SHA = 40 symbols):
Example for pull-request stage (SHA = 11 symbols):
As a result for the same commit, variable BITBUCKET_COMMIT has different values.
Suggestion: do a consistent "pull-requests" stage and take 40 symbols commit hash.