-
Notifications
You must be signed in to change notification settings - Fork 40
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
Added rollbar configuration #635
Changes from 2 commits
1d27ed5
2babcb2
97650a9
b5ddde6
0b13d4c
ec68888
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,6 +213,12 @@ and you can see the test running in the browser. | |
Check the [DDEV documentation](https://ddev.readthedocs.io/en/latest/users/debugging-profiling/step-debugging/) | ||
if you are using other IDE or want to know more about this feature. | ||
|
||
## Prepare for Deployment | ||
|
||
### Rollbar configuration | ||
|
||
Rollbar will be automatically enabled on test and live environments. The access tokens need to be added and the rollbar configuration yml file should be committed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide the link |
||
|
||
## Deploy to Pantheon | ||
|
||
### Pantheon Setup | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,14 +43,14 @@ | |
if (file_exists($local_settings)) { | ||
include $local_settings; | ||
} | ||
|
||
$pantheon_env = getenv('PANTHEON_ENVIRONMENT'); | ||
$pantheon_site_name = getenv('PANTHEON_SITE_NAME'); | ||
$base_private_dir = '../config/elasticsearch'; | ||
$settings['site_id'] = 'drupal_starter'; | ||
if (file_exists($base_private_dir . '/' . $settings['site_id'] . '.es.secrets.json')) { | ||
$es_credentials = json_decode(file_get_contents($base_private_dir . '/' . $settings['site_id'] . '.es.secrets.json'), TRUE); | ||
if (is_array($es_credentials)) { | ||
$fallback = 'dev'; | ||
$pantheon_env = getenv('PANTHEON_ENVIRONMENT'); | ||
$env = str_replace('-', '_', !empty($pantheon_env) ? $pantheon_env : $fallback); | ||
|
||
if (!isset($es_credentials[$env])) { | ||
|
@@ -70,9 +70,12 @@ | |
} | ||
} | ||
} | ||
|
||
$pantheon_env = getenv('PANTHEON_ENVIRONMENT'); | ||
if (!empty($pantheon_env)) { | ||
// Rollbar settings for LIVE and TEST. | ||
if ($pantheon_env == 'live' || $pantheon_env == 'test') { | ||
$config['rollbar.environment'] = $pantheon_site_name . '.' . $pantheon_env; | ||
$config['rollbar.enabled'] = TRUE; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we would also have the access token of rollbar right? If so, let's add a placeholder There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. Access token is saved in the module's config file, but there is a setting which disables the module, here we just enable it. |
||
} | ||
switch ($pantheon_env) { | ||
case 'test': | ||
$config['environment_indicator.indicator']['bg_color'] = '#ffcc6b'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move it under
Deploy to Pantheon
and removePrepare for Deployment