Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIVIS-175] refactor env providers to support custom logic to determine which env they handle #52

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

anmarchenko
Copy link
Member

What does this PR do?
Changes the env provider selection logic and pushes it down to specific provider classes in order to support custom logic for selection (like when the ENV value must start with specific prefix).

Motivation
Preparation for AWS CodePipeline support

How to test the change?
Unit tests

@codecov-commenter
Copy link

Codecov Report

Merging #52 (1afdbdd) into main (9b83a30) will decrease coverage by 0.03%.
The diff coverage is 96.66%.

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
- Coverage   99.15%   99.13%   -0.03%     
==========================================
  Files          95       95              
  Lines        3324     3352      +28     
  Branches      129      129              
==========================================
+ Hits         3296     3323      +27     
- Misses         28       29       +1     
Files Coverage Δ
lib/datadog/ci/ext/environment/providers.rb 100.00% <100.00%> (ø)
...b/datadog/ci/ext/environment/providers/appveyor.rb 100.00% <100.00%> (ø)
lib/datadog/ci/ext/environment/providers/azure.rb 100.00% <100.00%> (ø)
.../datadog/ci/ext/environment/providers/bitbucket.rb 100.00% <100.00%> (ø)
...ib/datadog/ci/ext/environment/providers/bitrise.rb 100.00% <100.00%> (ø)
lib/datadog/ci/ext/environment/providers/buddy.rb 100.00% <100.00%> (ø)
.../datadog/ci/ext/environment/providers/buildkite.rb 100.00% <100.00%> (ø)
...b/datadog/ci/ext/environment/providers/circleci.rb 100.00% <100.00%> (ø)
.../datadog/ci/ext/environment/providers/codefresh.rb 100.00% <100.00%> (ø)
...dog/ci/ext/environment/providers/github_actions.rb 100.00% <100.00%> (ø)
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@anmarchenko anmarchenko changed the title refactor env providers to support custom logic to determine which env they handle [CIVIS-175] refactor env providers to support custom logic to determine which env they handle Oct 19, 2023
@anmarchenko anmarchenko merged commit 5707183 into main Oct 19, 2023
27 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/refactor_env_providers branch October 19, 2023 15:08
@github-actions github-actions bot added this to the 0.3.0 milestone Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants