-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5582 from dodona-edu/chore/sentry-releases
Fix sentry release information
- Loading branch information
Showing
7 changed files
with
13 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,18 +22,3 @@ jobs: | |
- name: Run deploy | ||
run: | | ||
echo "deploy production $GITHUB_SHA" | ssh -p 4840 [email protected] | ||
- name: Get tag name | ||
id: tag_name | ||
run: echo "tag_name=$(date +'%Y.%m.%d-%H:%M')" >> "$GITHUB_ENV" | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Create Sentry release | ||
uses: getsentry/action-release@v1 | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: dodona | ||
SENTRY_PROJECT: dodona-frontend | ||
with: | ||
environment: production | ||
version: ${{ env.tag_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import * as Sentry from "@sentry/browser"; | ||
|
||
const HOST_TO_ENVIRONMENT: Record<string, string> = { | ||
"dodona.localhost": "development", | ||
"naos.dodona.be": "staging", | ||
"dodona.be": "production", | ||
}; | ||
|
||
export function initSentry(): void { | ||
const environment = window.location.hostname in HOST_TO_ENVIRONMENT ? | ||
HOST_TO_ENVIRONMENT[window.location.hostname] : "unknown"; | ||
const environmentTag = document.querySelector("meta[name='environment']"); | ||
const environment = environmentTag?.getAttribute("content") ?? "unknown"; | ||
const releaseTag = document.querySelector("meta[name='version']"); | ||
const release = releaseTag?.getAttribute("content") ?? "unknown"; | ||
|
||
// config options can be found at https://docs.sentry.io/platforms/javascript/configuration/ | ||
Sentry.init({ | ||
dsn: "https://18315b6d60f9329de56983fd94f67db9@o4507329115783168.ingest.de.sentry.io/4507333215256657", | ||
environment, | ||
release, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters