Use Devops script to upload to AWS in staging and development (#1950)

This commit is contained in:
Daniel Sanchez 2021-02-24 21:21:36 +01:00 committed by GitHub
parent 3f413cf86c
commit 794e38abe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 35 deletions

View File

@ -98,17 +98,20 @@ jobs:
env:
REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review.gnosisdev.com
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Script to deploy to development environment
# xDai build is never created in development branch
# EWC build is never created in development branch
# Script to deploy to staging environment
- name: 'Deploy to S3: Staging'
run: bash ./scripts/github/deploy_to_s3_bucket.sh
if: github.ref == 'refs/heads/master'
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }}
run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete
# Script to upload release files
- run: bash ./scripts/github/deploy_release.sh

View File

@ -76,6 +76,13 @@ jobs:
REACT_APP_INTERCOM_ID: ${{ secrets.REACT_APP_INTERCOM_ID }}
REACT_APP_IPFS_GATEWAY: ${{ secrets.REACT_APP_IPFS_GATEWAY }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Script to deploy Pull Requests
# Mainnet build is never created in Pull Requests
@ -84,12 +91,8 @@ jobs:
# Script to deploy to staging environment
- name: 'Deploy to S3: Staging'
run: bash ./scripts/github/deploy_to_s3_bucket.sh
if: github.ref == 'refs/heads/master'
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }}
if: github.ref == 'refs/heads/master' # Or refs/heads/main
run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete
# Script to upload release files
- run: bash ./scripts/github/deploy_release.sh

View File

@ -80,6 +80,13 @@ jobs:
REACT_APP_INTERCOM_ID: ${{ secrets.REACT_APP_INTERCOM_ID }}
REACT_APP_IPFS_GATEWAY: ${{ secrets.REACT_APP_IPFS_GATEWAY }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Script to deploy Pull Requests
- run: bash ./scripts/github/deploy_pull_request.sh
if: success() && github.event.number
@ -105,21 +112,13 @@ jobs:
# Script to deploy to development environment
- name: 'Deploy to S3: Develop'
run: bash ./scripts/github/deploy_to_s3_bucket.sh
if: github.ref == 'refs/heads/development'
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
BUCKET_NAME: ${{ secrets.AWS_DEV_BUCKET_NAME }}
if: github.ref == 'refs/heads/develop'
run: aws s3 sync build s3://${{ secrets.AWS_DEV_BUCKET_NAME }}/app --delete
# Script to deploy to staging environment
- name: 'Deploy to S3: Staging'
run: bash ./scripts/github/deploy_to_s3_bucket.sh
if: github.ref == 'refs/heads/master'
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }}
run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete
# Script to upload release files
- run: bash ./scripts/github/deploy_release.sh

View File

@ -101,17 +101,21 @@ jobs:
env:
REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review.gnosisdev.com
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Script to deploy to development environment
# xDai build is never created in development branch
# Volta build is never created in development branch
# Script to deploy to staging environment
- name: 'Deploy to S3: Staging'
run: bash ./scripts/github/deploy_to_s3_bucket.sh
if: github.ref == 'refs/heads/master'
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }}
run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete
# Script to upload release files
- run: bash ./scripts/github/deploy_release.sh

View File

@ -101,17 +101,20 @@ jobs:
env:
REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review.gnosisdev.com
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
# Script to deploy to development environment
# xDai build is never created in development branch
# Script to deploy to staging environment
- name: 'Deploy to S3: Staging'
run: bash ./scripts/github/deploy_to_s3_bucket.sh
if: github.ref == 'refs/heads/master'
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }}
run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete
# Script to upload release files
- run: bash ./scripts/github/deploy_release.sh