Class: Datadog::CI::Ext::Environment::Providers::Bitbucket
- Inherits:
-
Base
- Object
- Base
- Datadog::CI::Ext::Environment::Providers::Bitbucket
show all
- Defined in:
- lib/datadog/ci/ext/environment/providers/bitbucket.rb
Overview
Instance Attribute Summary
Attributes inherited from Base
#env
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#additional_tags, #ci_env_vars, #git_branch_or_tag, #git_commit_author_date, #git_commit_author_email, #git_commit_author_name, #git_commit_committer_date, #git_commit_committer_email, #git_commit_committer_name, #git_commit_message, #initialize, #job_name, #node_labels, #node_name, #stage_name
Class Method Details
.handles?(env) ⇒ Boolean
13
14
15
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 13
def self.handles?(env)
env.key?("BITBUCKET_COMMIT")
end
|
Instance Method Details
#git_branch ⇒ Object
54
55
56
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 54
def git_branch
env["BITBUCKET_BRANCH"]
end
|
#git_commit_sha ⇒ Object
50
51
52
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 50
def git_commit_sha
env["BITBUCKET_COMMIT"]
end
|
#git_repository_url ⇒ Object
46
47
48
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 46
def git_repository_url
env["BITBUCKET_GIT_SSH_ORIGIN"] || env["BITBUCKET_GIT_HTTP_ORIGIN"]
end
|
#git_tag ⇒ Object
58
59
60
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 58
def git_tag
env["BITBUCKET_TAG"]
end
|
#job_url ⇒ Object
38
39
40
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 38
def job_url
url
end
|
#pipeline_id ⇒ Object
22
23
24
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 22
def pipeline_id
env["BITBUCKET_PIPELINE_UUID"]&.tr("{}", "")
end
|
#pipeline_name ⇒ Object
26
27
28
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 26
def pipeline_name
env["BITBUCKET_REPO_FULL_NAME"]
end
|
#pipeline_number ⇒ Object
30
31
32
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 30
def pipeline_number
env["BITBUCKET_BUILD_NUMBER"]
end
|
#pipeline_url ⇒ Object
34
35
36
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 34
def pipeline_url
url
end
|
#provider_name ⇒ Object
18
19
20
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 18
def provider_name
Provider::BITBUCKET
end
|
#workspace_path ⇒ Object
42
43
44
|
# File 'lib/datadog/ci/ext/environment/providers/bitbucket.rb', line 42
def workspace_path
env["BITBUCKET_CLONE_DIR"]
end
|