-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The default behaviour on some CI/CD systems (e.g. Atlassian bitbucket) when cloning a Git repo is to use a specific clone "depth" rather than a full clone.
This appears to lead to less precision in the SHA digest associated with a commit (e.g. from 8 digits with a full clone to just 7 with a shallow clone).
This can cause issues with Pact Brokers if the cloning behaviour is different for e.g. pipelines that publish/verify contracts and those that use can-i-deploy to gate deployment decisions, because the pacticipant versions will not match due to the absolute version in one case picking up a 7 digit SHA digest, and in the other picking up an 8-digit SHA digest.
In the case of Atlassian Bitbucket, use of the specific step parameter
- step:
...
clone:
depth: full
prevents shallow cloning and ensures a consistent digest length, but its possible the shallow clone effect upon digest length is a specific bug in bitbucket