Skip to content

Commit

Permalink
Add sentry auth token to credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed May 31, 2024
1 parent 790af23 commit 65bf140
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,17 @@
end
end

require "active_support/encrypted_configuration"
require "active_support/core_ext/hash/keys"

# Set the sentry auth token as an environment variable
set :default_env, {
'SENTRY_AUTH_TOKEN' => YAML.load(`rails credentials:show`)['sentry_auth_token']
'SENTRY_AUTH_TOKEN' => YAML.load(
ActiveSupport::EncryptedConfiguration.new(
config_path: "config/credentials.yml.enc",
key_path: "config/master.key",
env_key: "RAILS_MASTER_KEY",
raise_if_missing_key: true
).read
)['sentry_auth_token']
}

0 comments on commit 65bf140

Please sign in to comment.