Module: Datadog::CI::Ext::Environment::Providers

Defined in:
lib/datadog/ci/ext/environment/providers.rb,
lib/datadog/ci/ext/environment/providers/base.rb,
lib/datadog/ci/ext/environment/providers/azure.rb,
lib/datadog/ci/ext/environment/providers/buddy.rb,
lib/datadog/ci/ext/environment/providers/gitlab.rb,
lib/datadog/ci/ext/environment/providers/travis.rb,
lib/datadog/ci/ext/environment/providers/bitrise.rb,
lib/datadog/ci/ext/environment/providers/jenkins.rb,
lib/datadog/ci/ext/environment/providers/appveyor.rb,
lib/datadog/ci/ext/environment/providers/circleci.rb,
lib/datadog/ci/ext/environment/providers/teamcity.rb,
lib/datadog/ci/ext/environment/providers/bitbucket.rb,
lib/datadog/ci/ext/environment/providers/buildkite.rb,
lib/datadog/ci/ext/environment/providers/codefresh.rb,
lib/datadog/ci/ext/environment/providers/local_git.rb,
lib/datadog/ci/ext/environment/providers/github_actions.rb,
lib/datadog/ci/ext/environment/providers/aws_code_pipeline.rb,
lib/datadog/ci/ext/environment/providers/user_defined_tags.rb

Defined Under Namespace

Classes: Appveyor, AwsCodePipeline, Azure, Base, Bitbucket, Bitrise, Buddy, Buildkite, Circleci, Codefresh, GithubActions, Gitlab, Jenkins, LocalGit, Teamcity, Travis, UserDefinedTags

Constant Summary collapse

PROVIDERS =
[
  Providers::Appveyor,
  Providers::AwsCodePipeline,
  Providers::Azure,
  Providers::Bitbucket,
  Providers::Bitrise,
  Providers::Buddy,
  Providers::Buildkite,
  Providers::Circleci,
  Providers::Codefresh,
  Providers::GithubActions,
  Providers::Gitlab,
  Providers::Jenkins,
  Providers::Teamcity,
  Providers::Travis
]

Class Method Summary collapse

Class Method Details

.for_environment(env) ⇒ Object



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

def self.for_environment(env)
  provider_klass = PROVIDERS.find { |klass| klass.handles?(env) }
  provider_klass = Providers::Base if provider_klass.nil?

  provider_klass.new(env)
end