Commit 43fe322d authored by Christopher Fullarton's avatar Christopher Fullarton

Adds sentry sync for staging and beta server

parent 1f307fd1
Pipeline #33432 failed
......@@ -54,6 +54,8 @@ build:
tags:
- nodejs
- angular
before_script:
- sed -ri "s|\"VERSION\"|\"$CI_COMMIT_SHA\"|" src/environments/environment.thm.staging.ts
script:
- npm install
- npm install typescript@3.5.3
......@@ -88,6 +90,25 @@ generate_assets:
paths:
- dist
sync_sentry:
stage: deploy
only:
- master
dependencies:
- generate_assets
image: getsentry/sentry-cli
script:
- echo "Create a new release $CI_COMMIT_SHA"
#- export SENTRY_URL=$SENTRY_BASE_URL
- export SENTRY_AUTH_TOKEN=$SENTRY_BASE_TOKEN
- export SENTRY_ORG=$SENTRY_BASE_ORGANIZATION
- export SENTRY_PROJECT=$SENTRY_BASE_PROJECT
- sentry-cli releases new $CI_COMMIT_SHA
- sentry-cli releases set-commits --auto $CI_COMMIT_SHA
- sentry-cli releases files $CI_COMMIT_SHA upload-sourcemaps $CI_PROJECT_DIR/dist -x .js -x .map --validate --verbose --rewrite --strip-common-prefix
- sentry-cli releases finalize $CI_COMMIT_SHA
- echo "Finalized release for $CI_COMMIT_SHA"
deploy:
stage: deploy
only:
......@@ -95,13 +116,14 @@ deploy:
tags:
- rsync
dependencies:
- generate_assets
- sync_sentry
script:
- chmod -R a+rX,ug+w .
- eval $(ssh-agent -s)
- mkdir ~/.ssh
- ssh-keyscan "$STAGING_FRONTEND_URL" >> ~/.ssh/known_hosts
- ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY")
- rm dist/*.map
- rsync -rltgoDqv --delete -e "ssh" dist/* "$STAGING_FRONTEND_SCP_URL"
- ssh $STAGING_SSH 'touch /home/arsnova/arsnova.click-v2/frontend/deploy.touch'
......@@ -112,6 +134,8 @@ build-beta:
tags:
- nodejs
- angular
before_script:
- sed -ri "s|\"VERSION\"|\"$CI_COMMIT_SHA\"|" src/environments/environment.thm.beta.ts
script:
- npm install
- npm install typescript@3.5.3
......@@ -146,6 +170,25 @@ generate_assets-beta:
paths:
- dist
sync_sentry-beta:
stage: deploy-beta
only:
- beta
dependencies:
- generate_assets-beta
image: getsentry/sentry-cli
script:
- echo "Create a new release $CI_COMMIT_SHA"
#- export SENTRY_URL=$SENTRY_BASE_URL
- export SENTRY_AUTH_TOKEN=$SENTRY_BASE_TOKEN
- export SENTRY_ORG=$SENTRY_BASE_ORGANIZATION
- export SENTRY_PROJECT=$SENTRY_BASE_PROJECT
- sentry-cli releases new $CI_COMMIT_SHA
- sentry-cli releases set-commits --auto $CI_COMMIT_SHA
- sentry-cli releases files $CI_COMMIT_SHA upload-sourcemaps $CI_PROJECT_DIR/dist -x .js -x .map --validate --verbose --rewrite --strip-common-prefix
- sentry-cli releases finalize $CI_COMMIT_SHA
- echo "Finalized release for $CI_COMMIT_SHA"
deploy-beta:
stage: deploy-beta
only:
......@@ -153,12 +196,13 @@ deploy-beta:
tags:
- rsync
dependencies:
- generate_assets-beta
- sync_sentry-beta
script:
- chmod -R a+rX,ug+w .
- eval $(ssh-agent -s)
- mkdir ~/.ssh
- ssh-keyscan "$STAGING_FRONTEND_URL" >> ~/.ssh/known_hosts
- ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY")
- rm dist/*.map
- rsync -rltgoDqv --delete -e "ssh" dist/* "$BETA_FRONTEND_SCP_URL"
- ssh $STAGING_SSH 'touch /home/arsnova/arsnova.click-v2-beta/frontend/deploy.touch'
......@@ -116,7 +116,11 @@
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": {
"hidden": true,
"styles": true,
"scripts": true
},
"extractCss": true,
"namedChunks": false,
"aot": true,
......@@ -199,7 +203,11 @@
"thmStaging": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": {
"hidden": true,
"styles": true,
"scripts": true
},
"extractCss": true,
"namedChunks": false,
"aot": true,
......@@ -282,7 +290,11 @@
"thmBeta": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": {
"hidden": true,
"styles": true,
"scripts": true
},
"extractCss": true,
"namedChunks": false,
"aot": true,
......@@ -373,7 +385,11 @@
"westermann": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": {
"hidden": true,
"styles": true,
"scripts": true
},
"extractCss": true,
"namedChunks": false,
"aot": true,
......
......@@ -2,6 +2,7 @@ import { LoginMechanism } from '../enums/enums';
import { QuizTheme } from '../enums/QuizTheme';
export interface IEnvironment {
version: string;
claimSrc?: string;
production: boolean;
ssrEndpoint: string;
......
......@@ -11,6 +11,7 @@ export class SentryErrorHandler implements ErrorHandler {
SentryInit({
dsn: 'https://f16c02fdefe64c018f5d580d1cf05b56@sentry.io/1819496',
enabled: this._enabled,
release: environment.version,
});
setExtra('nonErrorException', true);
......
......@@ -4,6 +4,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
version: 'VERSION',
ssrEndpoint: 'https://staging.arsnova.click/backend',
serverEndpoint: 'https://staging.arsnova.click/backend',
httpApiEndpoint: 'https://staging.arsnova.click/backend/api/v1',
......
......@@ -4,6 +4,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
version: 'VERSION',
ssrEndpoint: 'https://beta.arsnova.click/backend',
serverEndpoint: 'https://beta.arsnova.click/backend',
httpApiEndpoint: 'https://beta.arsnova.click/backend/api/v1',
......
......@@ -4,6 +4,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
version: 'VERSION',
ssrEndpoint: 'https://staging.arsnova.click/backend',
serverEndpoint: 'https://staging.arsnova.click/backend',
httpApiEndpoint: 'https://staging.arsnova.click/backend/api/v1',
......
......@@ -9,6 +9,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: false,
version: 'VERSION',
ssrEndpoint: 'http://192.168.2.106:4000',
serverEndpoint: 'http://192.168.2.106:3010',
httpApiEndpoint: 'http://192.168.2.106:3010/api/v1',
......
......@@ -4,6 +4,7 @@ import { IEnvironment } from '../app/lib/interfaces/IEnvironment';
export const environment: IEnvironment = {
production: true,
version: 'VERSION',
ssrEndpoint: 'https://test01.ars.sbzo.de',
serverEndpoint: 'https://test01.ars.sbzo.de',
httpApiEndpoint: 'https://test01.ars.sbzo.de/api/v1',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment