Class: Datadog::CI::Ext::Environment::Providers::Buddy

Inherits:
Base
  • Object
show all
Defined in:
lib/datadog/ci/ext/environment/providers/buddy.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, #initialize, #job_name, #job_url, #node_labels, #node_name, #stage_name

Constructor Details

This class inherits a constructor from Datadog::CI::Ext::Environment::Providers::Base

Class Method Details

.handles?(env) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 13

def self.handles?(env)
  env.key?("BUDDY")
end

Instance Method Details

#git_branchObject



49
50
51
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 49

def git_branch
  env["BUDDY_EXECUTION_BRANCH"]
end

#git_commit_committer_emailObject



65
66
67
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 65

def git_commit_committer_email
  env["BUDDY_EXECUTION_REVISION_COMMITTER_EMAIL"]
end

#git_commit_committer_nameObject



61
62
63
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 61

def git_commit_committer_name
  env["BUDDY_EXECUTION_REVISION_COMMITTER_NAME"]
end

#git_commit_messageObject



57
58
59
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 57

def git_commit_message
  env["BUDDY_EXECUTION_REVISION_MESSAGE"]
end

#git_commit_shaObject



45
46
47
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 45

def git_commit_sha
  env["BUDDY_EXECUTION_REVISION"]
end

#git_repository_urlObject



41
42
43
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 41

def git_repository_url
  env["BUDDY_SCM_URL"]
end

#git_tagObject



53
54
55
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 53

def git_tag
  env["BUDDY_EXECUTION_TAG"]
end

#pipeline_idObject



21
22
23
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 21

def pipeline_id
  "#{env["BUDDY_PIPELINE_ID"]}/#{env["BUDDY_EXECUTION_ID"]}"
end

#pipeline_nameObject



25
26
27
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 25

def pipeline_name
  env["BUDDY_PIPELINE_NAME"]
end

#pipeline_numberObject



29
30
31
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 29

def pipeline_number
  env["BUDDY_EXECUTION_ID"]
end

#pipeline_urlObject



33
34
35
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 33

def pipeline_url
  env["BUDDY_EXECUTION_URL"]
end

#provider_nameObject



17
18
19
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 17

def provider_name
  Provider::BUDDYCI
end

#workspace_pathObject



37
38
39
# File 'lib/datadog/ci/ext/environment/providers/buddy.rb', line 37

def workspace_path
  env["CI_WORKSPACE_PATH"]
end