Class: Datadog::CI::Ext::Environment::Providers::Drone
- Inherits:
-
Base
- Object
- Base
- Datadog::CI::Ext::Environment::Providers::Drone
show all
- Defined in:
- lib/datadog/ci/ext/environment/providers/drone.rb
Overview
Instance Attribute Summary
Attributes inherited from Base
#env
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#ci_env_vars, #git_branch_or_tag, #git_commit_author_date, #git_commit_committer_date, #git_commit_committer_email, #git_commit_committer_name, #git_commit_head_author_date, #git_commit_head_author_email, #git_commit_head_author_name, #git_commit_head_committer_date, #git_commit_head_committer_email, #git_commit_head_committer_name, #git_commit_head_message, #git_commit_head_sha, #git_pull_request_base_branch_head_sha, #git_pull_request_base_branch_sha, #initialize, #job_id, #job_url, #node_labels, #node_name, #pipeline_id, #pipeline_name
Class Method Details
.handles?(env) ⇒ Boolean
15
16
17
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 15
def self.handles?(env)
env.key?("DRONE")
end
|
Instance Method Details
#git_branch ⇒ Object
51
52
53
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 51
def git_branch
env["DRONE_BRANCH"]
end
|
#git_commit_author_email ⇒ Object
63
64
65
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 63
def git_commit_author_email
env["DRONE_COMMIT_AUTHOR_EMAIL"]
end
|
#git_commit_author_name ⇒ Object
59
60
61
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 59
def git_commit_author_name
env["DRONE_COMMIT_AUTHOR_NAME"]
end
|
#git_commit_message ⇒ Object
67
68
69
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 67
def git_commit_message
env["DRONE_COMMIT_MESSAGE"]
end
|
#git_commit_sha ⇒ Object
47
48
49
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 47
def git_commit_sha
env["DRONE_COMMIT_SHA"]
end
|
#git_pull_request_base_branch ⇒ Object
71
72
73
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 71
def git_pull_request_base_branch
env["DRONE_TARGET_BRANCH"]
end
|
#git_repository_url ⇒ Object
43
44
45
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 43
def git_repository_url
env["DRONE_GIT_HTTP_URL"]
end
|
#git_tag ⇒ Object
55
56
57
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 55
def git_tag
env["DRONE_TAG"]
end
|
#job_name ⇒ Object
23
24
25
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 23
def job_name
env["DRONE_STEP_NAME"]
end
|
#pipeline_number ⇒ Object
27
28
29
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 27
def pipeline_number
env["DRONE_BUILD_NUMBER"]
end
|
#pipeline_url ⇒ Object
31
32
33
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 31
def pipeline_url
env["DRONE_BUILD_LINK"]
end
|
#pr_number ⇒ Object
75
76
77
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 75
def pr_number
env["DRONE_PULL_REQUEST"]
end
|
#provider_name ⇒ Object
19
20
21
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 19
def provider_name
Provider::DRONE
end
|
#stage_name ⇒ Object
35
36
37
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 35
def stage_name
env["DRONE_STAGE_NAME"]
end
|
#workspace_path ⇒ Object
39
40
41
|
# File 'lib/datadog/ci/ext/environment/providers/drone.rb', line 39
def workspace_path
env["DRONE_WORKSPACE"]
end
|