Skip to content

Commit

Permalink
incorporate sentry dsn for testing into existing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertdeng123 committed Mar 6, 2024
1 parent c21576f commit d46632b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
compose_path: "/usr/local/lib/docker/cli-plugins"
env:
COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }}
SENTRY_DSN: https://[email protected]/6627632
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -91,7 +92,7 @@ jobs:
timeout_minutes: 10
retry_on: error
command: |
export REPORT_SELF_HOSTED_ISSUES=0
export REPORT_SELF_HOSTED_ISSUES=1
./install.sh
- name: Integration Test
Expand Down
7 changes: 1 addition & 6 deletions _integration-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ teardown() {
DID_TEAR_DOWN=1

if [ "$1" != "EXIT" ]; then
set +x
error_msg="An error occurred, caught SIG$1 on line $2"
echo "$error_msg"
dsn="https://[email protected]/6627632"
local sentry_cli="docker run --rm -v $(pwd):/work -e SENTRY_DSN=$dsn getsentry/sentry-cli"
$sentry_cli send-event -m "$error_msg" --logfile $log_file
echo "An error occurred, caught SIG$1 on line $2"
fi

echo "Tearing down ..."
Expand Down
8 changes: 4 additions & 4 deletions install/error-handling.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
echo "${_group}Setting up error handling ..."

export SENTRY_DSN='https://[email protected]/3'
export SENTRY_ORG=self-hosted
export SENTRY_PROJECT=installer
if [ -z "$SENTRY_DSN" ]; then
export SENTRY_DSN='https://19555c489ded4769978daae92f2346ca@self-hosted.getsentry.net/3'
fi

$dbuild -t sentry-self-hosted-jq-local --platform="$DOCKER_PLATFORM" jq

jq="docker run --rm -i sentry-self-hosted-jq-local"
sentry_cli="docker run --rm -v /tmp:/work -e SENTRY_ORG=$SENTRY_ORG -e SENTRY_PROJECT=$SENTRY_PROJECT -e SENTRY_DSN=$SENTRY_DSN getsentry/sentry-cli"
sentry_cli="docker run --rm -v /tmp:/work -e SENTRY_DSN=$SENTRY_DSN getsentry/sentry-cli"

send_envelope() {
# Send envelope
Expand Down

0 comments on commit d46632b

Please sign in to comment.