|
|
|
|
@ -73,7 +73,7 @@ steps: |
|
|
|
|
from_secret: AWS_DEFAULT_REGION |
|
|
|
|
AWS_MAX_ATTEMPTS: 10 |
|
|
|
|
commands: |
|
|
|
|
- aws s3 sync build s3://insports-auth --delete |
|
|
|
|
- aws s3 sync build_auth s3://insports-auth --delete |
|
|
|
|
- aws cloudfront create-invalidation --distribution-id EERIKX9X2SRPJ --paths "/*" |
|
|
|
|
depends_on: |
|
|
|
|
- make-auth |
|
|
|
|
@ -88,6 +88,8 @@ steps: |
|
|
|
|
- eval $(ssh-agent -s) |
|
|
|
|
- echo -n "$SSH_KEY_AUTH" | tr -d '\r' | ssh-add - |
|
|
|
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh |
|
|
|
|
- ssh-keyscan auth.insports.tv >> ~/.ssh/known_hosts |
|
|
|
|
- rsync -v -r -C build_auth/ ubuntu@auth.insports.tv:/home/ubuntu/ott-auth/src/frontend/ |
|
|
|
|
depends_on: |
|
|
|
|
- make-auth |
|
|
|
|
|
|
|
|
|
@ -681,3 +683,72 @@ steps: |
|
|
|
|
- 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 cloudfront create-invalidation --distribution-id E10YI3RFOZZDLZ --paths "/*" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
|
kind: pipeline |
|
|
|
|
type: docker |
|
|
|
|
name: deploy auth prod |
|
|
|
|
|
|
|
|
|
concurrency: |
|
|
|
|
limit: 1 |
|
|
|
|
|
|
|
|
|
platform: |
|
|
|
|
os: linux |
|
|
|
|
arch: amd64 |
|
|
|
|
|
|
|
|
|
trigger: |
|
|
|
|
ref: |
|
|
|
|
- refs/heads/auth |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- 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-production-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 |
|
|
|
|
AWS_SECRET_ACCESS_KEY: |
|
|
|
|
from_secret: AWS_SECRET_ACCESS_KEY |
|
|
|
|
AWS_DEFAULT_REGION: |
|
|
|
|
from_secret: AWS_DEFAULT_REGION |
|
|
|
|
AWS_MAX_ATTEMPTS: 10 |
|
|
|
|
commands: |
|
|
|
|
- aws s3 sync build_auth s3://insports-auth --delete |
|
|
|
|
- aws cloudfront create-invalidation --distribution-id EERIKX9X2SRPJ --paths "/*" |
|
|
|
|
depends_on: |
|
|
|
|
- make-auth |
|
|
|
|
|
|
|
|
|
- name: deploy-old-auth-server |
|
|
|
|
image: node:16-alpine |
|
|
|
|
environment: |
|
|
|
|
SSH_KEY_AUTH: |
|
|
|
|
from_secret: SSH_KEY_AUTH |
|
|
|
|
commands: |
|
|
|
|
- apk add --no-cache openssh-client rsync |
|
|
|
|
- eval $(ssh-agent -s) |
|
|
|
|
- echo -n "$SSH_KEY_AUTH" | tr -d '\r' | ssh-add - |
|
|
|
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh |
|
|
|
|
- ssh-keyscan auth.insports.tv >> ~/.ssh/known_hosts |
|
|
|
|
- rsync -v -r -C build_auth/ ubuntu@auth.insports.tv:/home/ubuntu/ott-auth/src/frontend/ |
|
|
|
|
depends_on: |
|
|
|
|
- make-auth |