Add Sentry Release Reporting (attempt 2)
This commit is contained in:
parent
809adee778
commit
3a6dd8ea10
2 changed files with 6 additions and 3 deletions
|
@ -23,13 +23,16 @@ build:
|
||||||
sentry:
|
sentry:
|
||||||
stage: ops
|
stage: ops
|
||||||
image: getsentry/sentry-cli
|
image: getsentry/sentry-cli
|
||||||
|
variables:
|
||||||
|
VERSION: 4.0.0-${CI_COMMIT_SHA:0:8}
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
dependencies:
|
dependencies:
|
||||||
- build
|
- build
|
||||||
script:
|
script:
|
||||||
- sentry-cli releases new -p geekbot 4.0.0-${CI_COMMIT_SHA:0:8}
|
- sentry-cli releases new -p geekbot $VERSION
|
||||||
- sentry-cli releases set-commits --auto 4.0.0-${CI_COMMIT_SHA:0:8}
|
- sentry-cli releases set-commits --auto $VERSION
|
||||||
|
- sentry-cli releases deploys $VERSION new -e Production
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace Geekbot.net.Lib.ErrorHandling
|
||||||
var sentryDsn = Environment.GetEnvironmentVariable("SENTRY");
|
var sentryDsn = Environment.GetEnvironmentVariable("SENTRY");
|
||||||
if (!string.IsNullOrEmpty(sentryDsn))
|
if (!string.IsNullOrEmpty(sentryDsn))
|
||||||
{
|
{
|
||||||
_raven = new RavenClient(sentryDsn) { Release = Constants.BotVersion() };
|
_raven = new RavenClient(sentryDsn) { Release = Constants.BotVersion(), Environment = "Production" };
|
||||||
_logger.Information(LogSource.Geekbot, $"Command Errors will be logged to Sentry: {sentryDsn}");
|
_logger.Information(LogSource.Geekbot, $"Command Errors will be logged to Sentry: {sentryDsn}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue