safe-react/.travis.yml

78 lines
1.9 KiB
YAML
Raw Normal View History

if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present)
2018-08-09 09:38:43 +00:00
sudo: required
2019-04-30 15:20:37 +00:00
dist: xenial
2018-08-09 09:38:43 +00:00
services:
- docker
language: node_js
node_js:
2019-03-06 14:14:08 +00:00
- "10"
os:
- linux
2018-08-09 10:15:38 +00:00
env:
global:
- DOCKER_COMPOSE_VERSION=1.22.0
matrix:
include:
- env:
- REACT_APP_NETWORK='mainnet'
- STAGING_BUCKET_NAME=${STAGING_MAINNET_BUCKET_NAME}
if: (branch = master AND NOT type = pull_request) OR tag IS present
- env:
- REACT_APP_NETWORK='rinkeby'
before_install:
# Needed to deploy pull request and releases
2019-12-16 12:26:21 +00:00
- sudo apt-get update
- sudo apt-get -y install python-pip python-dev
- pip install awscli --upgrade --user
2019-04-30 14:09:40 +00:00
# Install truffle
2019-04-30 14:48:24 +00:00
- yarn global add truffle
script:
- bash ./config/travis/build.sh
after_success:
# Pull Request - Deploy it to a review environment
# Travis doesn't do deploy step with pull requests builds
- ./config/travis/deploy_pull_request.sh
# Releases (tagged commits) - Deploy it to a release environment
- ./config/travis/deploy_release.sh
deploy:
# Development environment
- provider: s3
bucket: $DEV_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: build_webpack
upload-dir: app
region: $AWS_DEFAULT_REGION
on:
branch: development
# Staging environment
- provider: s3
bucket: $STAGING_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: build_webpack
upload-dir: current/app
region: $AWS_DEFAULT_REGION
on:
branch: master
# Prepare production deployment
- provider: s3
bucket: $STAGING_BUCKET_NAME
secret_access_key: $AWS_SECRET_ACCESS_KEY
access_key_id: $AWS_ACCESS_KEY_ID
skip_cleanup: true
local_dir: build_webpack
upload-dir: releases/$TRAVIS_TAG
region: $AWS_DEFAULT_REGION
on:
tags: true
- provider: script
script: ./config/travis/prepare_production_deployment.sh
on:
2020-02-27 14:09:35 +00:00
tags: true