Class: Datadog::CI::Ext::Environment::Providers::Travis
- Inherits:
-
Base
- Object
- Base
- Datadog::CI::Ext::Environment::Providers::Travis
show all
- Defined in:
- lib/datadog/ci/ext/environment/providers/travis.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, #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/travis.rb', line 13
def self.handles?(env)
env.key?("TRAVIS")
end
|
Instance Method Details
#git_branch ⇒ Object
53
54
55
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 53
def git_branch
env["TRAVIS_PULL_REQUEST_BRANCH"] || env["TRAVIS_BRANCH"]
end
|
#git_commit_message ⇒ Object
61
62
63
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 61
def git_commit_message
env["TRAVIS_COMMIT_MESSAGE"]
end
|
#git_commit_sha ⇒ Object
49
50
51
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 49
def git_commit_sha
env["TRAVIS_COMMIT"]
end
|
#git_repository_url ⇒ Object
45
46
47
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 45
def git_repository_url
"https://github.com/#{env["TRAVIS_REPO_SLUG"]}.git"
end
|
#git_tag ⇒ Object
57
58
59
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 57
def git_tag
env["TRAVIS_TAG"]
end
|
#job_url ⇒ Object
21
22
23
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 21
def job_url
env["TRAVIS_JOB_WEB_URL"]
end
|
#pipeline_id ⇒ Object
25
26
27
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 25
def pipeline_id
env["TRAVIS_BUILD_ID"]
end
|
#pipeline_name ⇒ Object
29
30
31
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 29
def pipeline_name
env["TRAVIS_REPO_SLUG"]
end
|
#pipeline_number ⇒ Object
33
34
35
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 33
def pipeline_number
env["TRAVIS_BUILD_NUMBER"]
end
|
#pipeline_url ⇒ Object
37
38
39
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 37
def pipeline_url
env["TRAVIS_BUILD_WEB_URL"]
end
|
#provider_name ⇒ Object
17
18
19
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 17
def provider_name
Provider::TRAVISCI
end
|
#workspace_path ⇒ Object
41
42
43
|
# File 'lib/datadog/ci/ext/environment/providers/travis.rb', line 41
def workspace_path
env["TRAVIS_BUILD_DIR"]
end
|