Class: Datadog::CI::Ext::Environment::Providers::Appveyor
- Inherits:
-
Base
- Object
- Base
- Datadog::CI::Ext::Environment::Providers::Appveyor
show all
- Defined in:
- lib/datadog/ci/ext/environment/providers/appveyor.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_committer_date, #git_commit_committer_email, #git_commit_committer_name, #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/appveyor.rb', line 13
def self.handles?(env)
env.key?("APPVEYOR")
end
|
Instance Method Details
#git_branch ⇒ Object
57
58
59
60
61
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 57
def git_branch
return nil unless github_repo_provider?
env["APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH"] || env["APPVEYOR_REPO_BRANCH"]
end
|
#git_commit_author_email ⇒ Object
73
74
75
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 73
def git_commit_author_email
env["APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL"]
end
|
#git_commit_author_name ⇒ Object
69
70
71
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 69
def git_commit_author_name
env["APPVEYOR_REPO_COMMIT_AUTHOR"]
end
|
#git_commit_message ⇒ Object
77
78
79
80
81
82
83
84
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 77
def git_commit_message
commit_message = env["APPVEYOR_REPO_COMMIT_MESSAGE"]
if commit_message
extended = env["APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED"]
commit_message = "#{commit_message}\n#{extended}" if extended
end
commit_message
end
|
#git_commit_sha ⇒ Object
51
52
53
54
55
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 51
def git_commit_sha
return nil unless github_repo_provider?
env["APPVEYOR_REPO_COMMIT"]
end
|
#git_repository_url ⇒ Object
45
46
47
48
49
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 45
def git_repository_url
return nil unless github_repo_provider?
"https://github.com/#{env["APPVEYOR_REPO_NAME"]}.git"
end
|
#git_tag ⇒ Object
63
64
65
66
67
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 63
def git_tag
return nil unless github_repo_provider?
env["APPVEYOR_REPO_TAG_NAME"]
end
|
#job_url ⇒ Object
25
26
27
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 25
def job_url
url
end
|
#pipeline_id ⇒ Object
33
34
35
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 33
def pipeline_id
env["APPVEYOR_BUILD_ID"]
end
|
#pipeline_name ⇒ Object
37
38
39
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 37
def pipeline_name
env["APPVEYOR_REPO_NAME"]
end
|
#pipeline_number ⇒ Object
41
42
43
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 41
def pipeline_number
env["APPVEYOR_BUILD_NUMBER"]
end
|
#pipeline_url ⇒ Object
21
22
23
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 21
def pipeline_url
url
end
|
#provider_name ⇒ Object
17
18
19
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 17
def provider_name
Provider::APPVEYOR
end
|
#workspace_path ⇒ Object
29
30
31
|
# File 'lib/datadog/ci/ext/environment/providers/appveyor.rb', line 29
def workspace_path
env["APPVEYOR_BUILD_FOLDER"]
end
|