diff --git a/.drone.yml b/.drone.yml index c9f8dd62..6397fe22 100644 --- a/.drone.yml +++ b/.drone.yml @@ -454,6 +454,46 @@ steps: - aws cloudfront create-invalidation --distribution-id EJYRP4WNVMWD1 --paths "/*" +--- +kind: pipeline +type: docker +name: deploy test-j + +concurrency: + limit: 1 + +platform: + os: linux + arch: amd64 + +trigger: + ref: + - refs/heads/test-j + +steps: + - name: deploy script + image: node:16-alpine + + environment: + AWS_ACCESS_KEY_ID: + from_secret: AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY: + from_secret: AWS_SECRET_ACCESS_KEY + AWS_DEFAULT_REGION: + from_secret: AWS_DEFAULT_REGION + REACT_APP_STRIPE_PK: + from_secret: REACT_APP_STRIPE_PK_TEST + SSH_KEY_AUTH: + from_secret: SSH_KEY_AUTH + + commands: + - apk add --no-cache aws-cli bash git openssh-client make rsync + - npm install --legacy-peer-deps + - make build-j + - aws s3 sync build s3://instat-frontend-test-j --delete + - aws cloudfront create-invalidation --distribution-id EC35D25OP7FSL --paths "/*" + + --- kind: pipeline type: docker diff --git a/Makefile b/Makefile index 8345e806..293df69c 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,13 @@ build-i: clean REACT_APP_STAGE=test-i \ npm run build +build-j: clean + REACT_APP_TYPE=ott \ + REACT_APP_ENV=staging \ + REACT_APP_CLIENT=insports \ + REACT_APP_STAGE=test-j \ + npm run build + auth-build: rm -rf build_auth diff --git a/src/config/routes.tsx b/src/config/routes.tsx index b307e805..76400246 100644 --- a/src/config/routes.tsx +++ b/src/config/routes.tsx @@ -12,8 +12,8 @@ export const APIS = { auth: 'https://auth.insports.tv', }, staging: { - api: 'https://api.test.insports.tv', - auth: 'https://auth.test.insports.tv', + api: 'https://www.api.test.insports.tv', + auth: 'https://www.auth.test.insports.tv', }, } diff --git a/src/react-app-env.d.ts b/src/react-app-env.d.ts index 9c206a49..65952d05 100644 --- a/src/react-app-env.d.ts +++ b/src/react-app-env.d.ts @@ -5,7 +5,7 @@ declare namespace NodeJS { export interface ProcessEnv { REACT_APP_CLIENT: 'instat' | 'facr' | 'lff' | 'insports', REACT_APP_ENV: 'production' | 'preproduction' | 'staging', - REACT_APP_STAGE: 'staging' | 'test-a' | 'test-b' | 'test-c' | 'test-d' | 'test-e' | 'test-f' | 'test-g' | 'test-h' | 'test-i' | 'test', + REACT_APP_STAGE: 'staging' | 'test-a' | 'test-b' | 'test-c' | 'test-d' | 'test-e' | 'test-f' | 'test-g' | 'test-h' | 'test-i' | 'test-j' | 'test', REACT_APP_TYPE: 'auth-service' | 'ott', } }