sentry: add a prefix to the release name

This commit is contained in:
Dawid Wysokiński 2021-11-10 08:07:46 +01:00
parent 962ed4b610
commit d4d5390517
Signed by: Kichiyaki
GPG Key ID: EF14026D247EB867
3 changed files with 5 additions and 3 deletions

View File

@ -46,7 +46,7 @@ jobs:
SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
VERSION=v${{ steps.get_version.outputs.VERSION }}
VERSION=${{ steps.get_version.outputs.VERSION }}
tags: |
${{ secrets.REGISTRY_NAME }}/zdam-egzamin-zawodowy-admin-panel:latest
${{ secrets.REGISTRY_NAME }}/zdam-egzamin-zawodowy-admin-panel:${{ steps.get_version.outputs.VERSION }}

View File

@ -13,7 +13,7 @@ async function createReleaseAndUpload() {
}
const cli = new SentryCli();
await cli.releases.new(version);
await cli.releases.new('zdam-egzamin-zawodowy-admin-panel@' + version);
await cli.releases.uploadSourceMaps(version, {
include: ['build/static/js'],
urlPrefix: '~/static/js',

View File

@ -10,7 +10,9 @@ const initSentry = () => {
dsn: process.env.REACT_APP_SENTRY_DSN,
integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 0.3,
release: process.env.REACT_APP_VERSION,
release:
'zdam-egzamin-zawodowy-admin-panel@' +
(process.env.REACT_APP_VERSION ?? 'development'),
environment: process.env.NODE_ENV ?? 'development',
});
};