Skip to content

Commit

Permalink
Refactor shared secrets across environments
Browse files Browse the repository at this point in the history
- Created additional groups to handle shared secrets across different environments.
  • Loading branch information
aaronskiba committed Jan 28, 2025
1 parent 9073c40 commit 8ca21f1
Showing 1 changed file with 17 additions and 42 deletions.
59 changes: 17 additions & 42 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,27 @@ shared:
cilogon_client_id: <%= ENV["CILOGON_CLIENT_ID"]%>
cilogon_secret_key: <%= ENV["CILOGON_SECRET_KEY"]%>

test_development:
mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] || Socket.gethostname %>

test:
<<: *test_development
database_test_url: <%= ENV['DATABASE_TEST_URL'] %>
mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] || Socket.gethostname %>

development:
production_staging_sandbox_uat_development:
database_url: <%= ENV['DATABASE_URL'] %>
mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] || Socket.gethostname %>
omniauth_full_host: <%= ENV['OMNIAUTH_FULL_HOST'] %>

staging:
database_url: <%= ENV['DATABASE_URL'] %>
development:
<<: *test_development
<<: *production_staging_sandbox_uat_development

production_staging_sandbox_uat:
<<: *production_staging_sandbox_uat_development
dmproadmap_host: <%= ENV['DMPROADMAP_HOST'] %>
http_proxy: <%= ENV['HTTP_PROXY'] %>
http_proxy_port: <%= ENV['HTTP_PROXY_PORT'] %>
mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] %>
omniauth_full_host: <%= ENV['OMNIAUTH_FULL_HOST'] %>
smtp_address: <%= ENV['SMTP_ADDRESS'] %>
smtp_authentication: <%= ENV['SMTP_AUTHENTICATION'] %>
smtp_domain: <%= ENV['SMTP_DOMAIN'] %>
Expand All @@ -64,43 +69,13 @@ staging:
smtp_user_name: <%= ENV['SMTP_USER_NAME'] %>

uat:
database_url: <%= ENV['DATABASE_URL'] %>
dmproadmap_host: <%= ENV['DMPROADMAP_HOST'] %>
http_proxy: <%= ENV['HTTP_PROXY'] %>
http_proxy_port: <%= ENV['HTTP_PROXY_PORT'] %>
mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] %>
omniauth_full_host: <%= ENV['OMNIAUTH_FULL_HOST'] %>
smtp_address: <%= ENV['SMTP_ADDRESS'] %>
smtp_authentication: <%= ENV['SMTP_AUTHENTICATION'] %>
smtp_domain: <%= ENV['SMTP_DOMAIN'] %>
smtp_password: <%= ENV['SMTP_PASSWORD'] %>
smtp_port: <%= ENV['SMTP_PORT'] %>
smtp_user_name: <%= ENV['SMTP_USER_NAME'] %>
<<: *production_staging_sandbox_uat

sandbox:
database_url: <%= ENV['DATABASE_URL'] %>
dmproadmap_host: <%= ENV['DMPROADMAP_HOST'] %>
http_proxy: <%= ENV['HTTP_PROXY'] %>
http_proxy_port: <%= ENV['HTTP_PROXY_PORT'] %>
mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] %>
omniauth_full_host: <%= ENV['OMNIAUTH_FULL_HOST'] %>
smtp_address: <%= ENV['SMTP_ADDRESS'] %>
smtp_authentication: <%= ENV['SMTP_AUTHENTICATION'] %>
smtp_domain: <%= ENV['SMTP_DOMAIN'] %>
smtp_password: <%= ENV['SMTP_PASSWORD'] %>
smtp_port: <%= ENV['SMTP_PORT'] %>
smtp_user_name: <%= ENV['SMTP_USER_NAME'] %>
<<: *production_staging_sandbox_uat

staging:
<<: *production_staging_sandbox_uat

production:
database_url: <%= ENV['DATABASE_URL'] %>
dmproadmap_host: <%= ENV['DMPROADMAP_HOST'] %>
http_proxy: <%= ENV['HTTP_PROXY'] %>
http_proxy_port: <%= ENV['HTTP_PROXY_PORT'] %>
mailer_default_host: <%= ENV['MAILER_DEFAULT_HOST'] %>
omniauth_full_host: <%= ENV['OMNIAUTH_FULL_HOST'] %>
smtp_address: <%= ENV['SMTP_ADDRESS'] %>
smtp_authentication: <%= ENV['SMTP_AUTHENTICATION'] %>
smtp_domain: <%= ENV['SMTP_DOMAIN'] %>
smtp_password: <%= ENV['SMTP_PASSWORD'] %>
smtp_port: <%= ENV['SMTP_PORT'] %>
smtp_user_name: <%= ENV['SMTP_USER_NAME'] %>
<<: *production_staging_sandbox_uat

0 comments on commit 8ca21f1

Please sign in to comment.