diff --git a/.drone.yml b/.drone.yml index ffe08ef2..5e8646ab 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: docker -name: deploy develop +name: deploy prod concurrency: limit: 1 @@ -12,7 +12,7 @@ platform: trigger: ref: - - refs/heads/develop + - refs/heads/master steps: - name: deploy script @@ -47,6 +47,45 @@ steps: - rsync -v -r -C build_auth/clients/* ubuntu@auth.insports.tv:/home/ubuntu/ott-auth/src/frontend/templates - ssh ubuntu@auth.insports.tv 'bash -s' < ./run.sh OTT-2535 docker-compose-stage.yaml +--- +kind: pipeline +type: docker +name: deploy preprod (test.insports.tv) + +concurrency: + limit: 1 + +platform: + os: linux + arch: amd64 + +trigger: + ref: + - refs/heads/preprod + +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 prod + - aws s3 sync build s3://instat-frontend-test --delete + - aws cloudfront create-invalidation --distribution-id E2ZD1DVVFA1ACC --paths "/*" + #--- #kind: pipeline #type: docker