Skip to content

Commit

Permalink
Add some lines for sentry back into gradle file.
Browse files Browse the repository at this point in the history
Make sentry code section in build.gradle optional.
  • Loading branch information
bseeger committed May 21, 2024
1 parent 4207a3f commit c210c18
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
'SMARTY_AUTH_ID=${{ secrets.SMARTY_AUTH_ID }}' \
'SMARTY_AUTH_TOKEN=${{ secrets.SMARTY_AUTH_TOKEN }}' \
'SENTRY_DNS'=${{ secrets.SENTRY_DSN }}' \
'SENTRY_AUTH_TOKEN'=${{ secrets.SENTRY_AUTH_TOKEN }}' \
'SENTRY_ENVIRONMENT=staging \
'ENCRYPTION_KEYSET=${{ secrets.STAGING_ENCRYPTION_KEYSET }}' \
'BALTIMORE_COUNTY_GOOGLE_DIR_ID=${{ secrets.STAGING_BALTIMORE_COUNTY_GOOGLE_DIR_ID }}' \
Expand Down
27 changes: 16 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,28 @@ tasks.withType(Test).configureEach {
// uncomment the following line to print stdout and stderr for every test
// showStandardStreams = true
}
print "🌟Running test configuration 🌟"
// override a few things.
environment("DEFAULT_LOCALE", "en")
// setting "SENTRY_DSN" to "" essentially turns off reporting to Sentry
environment("SENTRY_DSN", "")
environment("SENTRY_AUTH_TOKEN", "")
environment("MIXPANEL_API_KEY", "this-is-a-dummy-key-for-md-tests")
}

jar {
enabled false
}
/*
sentry {
// Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext = true
org = "codeforamerica"
projectName = "md-pilot"
authToken = System.getenv("SENTRY_AUTH_TOKEN")

if (profile == 'staging' || profile == 'prod') {
sentry {
// Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext = true

org = "codeforamerica"
projectName = "md-pilot"
authToken = System.getenv("SENTRY_AUTH_TOKEN")
}
}
*/

0 comments on commit c210c18

Please sign in to comment.