diff --git a/lib/pact_broker/client/git.rb b/lib/pact_broker/client/git.rb index 5c13def6..4925563c 100644 --- a/lib/pact_broker/client/git.rb +++ b/lib/pact_broker/client/git.rb @@ -11,6 +11,7 @@ CI_COMMIT_REF_NAME https://docs.gitlab.com/ee/ci/variables/predefined_variables.html CI_BRANCH CI_COMMIT_ID https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/ bamboo.repository.git.branch https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html +BITBUCKET_BRANCH https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html =end @@ -19,7 +20,7 @@ module PactBroker module Client module Git COMMAND = 'git name-rev --name-only HEAD'.freeze - BRANCH_ENV_VAR_NAMES = %w{BUILDKITE_BRANCH CIRCLE_BRANCH TRAVIS_BRANCH GIT_BRANCH GIT_LOCAL_BRANCH APPVEYOR_REPO_BRANCH CI_COMMIT_REF_NAME}.freeze + BRANCH_ENV_VAR_NAMES = %w{BUILDKITE_BRANCH CIRCLE_BRANCH TRAVIS_BRANCH GIT_BRANCH GIT_LOCAL_BRANCH APPVEYOR_REPO_BRANCH CI_COMMIT_REF_NAME BITBUCKET_BRANCH}.freeze def self.branch find_branch_from_env_vars || branch_from_git_command