Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronshiel committed Feb 12, 2024
2 parents de54841 + cd422cc commit b962aa8
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 26 deletions.
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,3 @@ test-e2e-exec:
test-e2e-up:
$(TEST_E2E_DOCKER_COMPOSE) up -d

.PHONY: deploy
deploy:
cd client && \
export GATSBY_GRAPHQL_ENDPOINT=https://api.devmentorpal.org/graphql/graphql && \
export GATSBY_STAGE=dev && \
npm run build && \
aws s3 sync ./public/ s3://mentorpal-us-east-1-newdev-mentorpal-origin/chat && \
aws cloudfront create-invalidation --distribution-id E6VOL8BYUVNWS --paths "/chat*"
5 changes: 0 additions & 5 deletions cicd/deployspec-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ env:
GATSBY_STAGE: 'dev'
GATSBY_IS_SENTRY_ENABLED: false
parameter-store:
S3_DEPLOY_BUCKET_NEWDEV: "/mentorpal/newdev/s3-websites/NAME"
CDN_ID_NEWDEV: "/mentorpal/newdev/CLOUDFRONT_DISTRIBUTION_ID"
S3_DEPLOY_BUCKET_DEV: "/devmentorpal/s3-websites/NAME"
CDN_ID_DEV: "/devmentorpal/CLOUDFRONT_DISTRIBUTION_ID"

Expand All @@ -22,9 +20,6 @@ phases:
build:
commands:
- cd client && npm run build
- echo Deploying to $S3_DEPLOY_BUCKET_NEWDEV
- aws s3 sync ./public s3://$S3_DEPLOY_BUCKET_NEWDEV/chat
- aws cloudfront create-invalidation --distribution-id $CDN_ID_NEWDEV --paths "/chat*"
- echo Deploying to $S3_DEPLOY_BUCKET_DEV
- aws s3 sync ./public s3://$S3_DEPLOY_BUCKET_DEV/chat
- aws cloudfront create-invalidation --distribution-id $CDN_ID_DEV --paths "/chat*"
7 changes: 1 addition & 6 deletions cicd/deployspec-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ env:
variables:
GATSBY_GRAPHQL_ENDPOINT: 'https://api.mentorpal.org/graphql/graphql'
GATSBY_NPCEDITOR_ENDPOINT: 'https://api.mentorpal.org/npceditor'
GATSBY_STAGE: 'cf'
GATSBY_STAGE: 'prod'
GATSBY_IS_SENTRY_ENABLED: true
parameter-store:
S3_DEPLOY_BUCKET_CF: "/mentorpal/cf/s3-websites/NAME"
CDN_ID_CF: "/mentorpal/cf/CLOUDFRONT_DISTRIBUTION_ID"
S3_DEPLOY_BUCKET: "/mentorpal/s3-websites/NAME"
CDN_ID: "/mentorpal/CLOUDFRONT_DISTRIBUTION_ID"

Expand All @@ -22,9 +20,6 @@ phases:
build:
commands:
- cd client && npm run build
- echo Deploying to $S3_DEPLOY_BUCKET_CF
- aws s3 sync ./public s3://$S3_DEPLOY_BUCKET_CF/chat
- aws cloudfront create-invalidation --distribution-id $CDN_ID_CF --paths "/chat*"
- echo Deploying to $S3_DEPLOY_BUCKET
- aws s3 sync ./public s3://$S3_DEPLOY_BUCKET/chat
- aws cloudfront create-invalidation --distribution-id $CDN_ID --paths "/chat*"
7 changes: 1 addition & 6 deletions cicd/deployspec-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ env:
variables:
GATSBY_GRAPHQL_ENDPOINT: 'https://api.qamentorpal.org/graphql/graphql'
GATSBY_NPCEDITOR_ENDPOINT: 'https://api.qamentorpal.org/npceditor'
GATSBY_STAGE: 'v2'
GATSBY_STAGE: 'qa'
GATSBY_IS_SENTRY_ENABLED: true
parameter-store:
S3_DEPLOY_BUCKET_V2: "/mentorpal/v2/s3-websites/NAME"
CDN_ID_V2: "/mentorpal/v2/CLOUDFRONT_DISTRIBUTION_ID"
S3_DEPLOY_BUCKET_QA: "/qamentorpal/s3-websites/NAME"
CDN_ID_QA: "/qamentorpal/CLOUDFRONT_DISTRIBUTION_ID"

Expand All @@ -22,9 +20,6 @@ phases:
build:
commands:
- cd client && npm run build
- echo Deploying to $S3_DEPLOY_BUCKET_V2
- aws s3 sync ./public s3://$S3_DEPLOY_BUCKET_V2/chat
- aws cloudfront create-invalidation --distribution-id $CDN_ID_V2 --paths "/chat*"
- echo Deploying to $S3_DEPLOY_BUCKET_QA
- aws s3 sync ./public s3://$S3_DEPLOY_BUCKET_QA/chat
- aws cloudfront create-invalidation --distribution-id $CDN_ID_QA --paths "/chat*"
2 changes: 1 addition & 1 deletion client/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function loadSentry(): void {
Sentry.init({
dsn: "https://[email protected]/6439056",
integrations: [new BrowserTracing()],
tracesSampleRate: process.env.GATSBY_STAGE == "cf" ? 0.2 : 0.0,
tracesSampleRate: process.env.GATSBY_STAGE == "prod" ? 0.2 : 0.0,
environment: process.env.GATSBY_STAGE,
});
}
Expand Down

0 comments on commit b962aa8

Please sign in to comment.