|
|
|
|
@ -658,9 +658,28 @@ trigger: |
|
|
|
|
- refs/heads/test-auth |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- name: deploy script |
|
|
|
|
- name: npm-install |
|
|
|
|
image: node:16-alpine |
|
|
|
|
environment: |
|
|
|
|
REACT_APP_STRIPE_PK: |
|
|
|
|
from_secret: REACT_APP_STRIPE_PK |
|
|
|
|
commands: |
|
|
|
|
- apk add --no-cache make |
|
|
|
|
- npm install --legacy-peer-deps |
|
|
|
|
|
|
|
|
|
- name: make-auth |
|
|
|
|
image: node:16-alpine |
|
|
|
|
environment: |
|
|
|
|
REACT_APP_STRIPE_PK: |
|
|
|
|
from_secret: REACT_APP_STRIPE_PK |
|
|
|
|
commands: |
|
|
|
|
- apk add --no-cache make |
|
|
|
|
- make auth-build |
|
|
|
|
depends_on: |
|
|
|
|
- npm-install |
|
|
|
|
|
|
|
|
|
- name: deploy-S3-auth |
|
|
|
|
image: amazon/aws-cli:latest |
|
|
|
|
environment: |
|
|
|
|
AWS_ACCESS_KEY_ID: |
|
|
|
|
from_secret: AWS_ACCESS_KEY_ID |
|
|
|
|
@ -668,23 +687,12 @@ steps: |
|
|
|
|
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_TEST: |
|
|
|
|
from_secret: SSH_KEY_AUTH_TEST |
|
|
|
|
|
|
|
|
|
AWS_MAX_ATTEMPTS: 10 |
|
|
|
|
commands: |
|
|
|
|
- apk add --no-cache aws-cli bash git openssh-client make rsync |
|
|
|
|
- npm install --legacy-peer-deps |
|
|
|
|
- make auth-build |
|
|
|
|
- eval $(ssh-agent -s) |
|
|
|
|
- echo -n "$SSH_KEY_AUTH_TEST" | tr -d '\r' | ssh-add - |
|
|
|
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh |
|
|
|
|
- ssh-keyscan auth.test.insports.tv >> ~/.ssh/known_hosts |
|
|
|
|
- rsync -v -r -C build_auth/ ubuntu@auth.test.insports.tv:/home/ubuntu/ott-auth/src/frontend/ |
|
|
|
|
- rsync -v -r -C build_auth/clients/* ubuntu@auth.test.insports.tv:/home/ubuntu/ott-auth/src/frontend/templates |
|
|
|
|
- aws s3 sync build_auth s3://auth-insports-test --delete |
|
|
|
|
- aws s3 sync build_auth s3://insports-auth-test --delete |
|
|
|
|
- aws cloudfront create-invalidation --distribution-id E10YI3RFOZZDLZ --paths "/*" |
|
|
|
|
depends_on: |
|
|
|
|
- make-auth |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|