Fix travis matrix build
- Add global env for docker-composer install. - Add matrix condition for mainnet build. - Set `REACT_APP_ENV` to production when tag is present.
This commit is contained in:
parent
100cb17cc3
commit
0dfb1d6d81
|
@ -9,20 +9,20 @@ node_js:
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
env:
|
env:
|
||||||
- DOCKER_COMPOSE_VERSION=1.22.0
|
global:
|
||||||
|
- DOCKER_COMPOSE_VERSION=1.22.0
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env:
|
- env:
|
||||||
- REACT_APP_NETWORK='mainnet'
|
- REACT_APP_NETWORK='mainnet'
|
||||||
- STAGING_BUCKET_NAME=${STAGING_MAINNET_BUCKET_NAME}
|
- STAGING_BUCKET_NAME=${STAGING_MAINNET_BUCKET_NAME}
|
||||||
before_install:
|
if: branch = master OR tag IS present
|
||||||
- if [[ "$TRAVIS_BRANCH" == "development" ]]; then exit 0; fi
|
|
||||||
- env:
|
- env:
|
||||||
- REACT_APP_NETWORK='rinkeby'
|
- REACT_APP_NETWORK='rinkeby'
|
||||||
before_install:
|
before_install:
|
||||||
# Install custom docker-compose version
|
# Install custom docker-compose version
|
||||||
- sudo rm /usr/local/bin/docker-compose
|
- sudo rm /usr/local/bin/docker-compose
|
||||||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
- curl -Ls https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
||||||
- chmod +x docker-compose
|
- chmod +x docker-compose
|
||||||
- sudo mv docker-compose /usr/local/bin
|
- sudo mv docker-compose /usr/local/bin
|
||||||
# Shut down postgres because it blocks our db container's port map to :5432
|
# Shut down postgres because it blocks our db container's port map to :5432
|
||||||
|
@ -59,6 +59,7 @@ after_success:
|
||||||
else
|
else
|
||||||
export NODE_ENV=development;
|
export NODE_ENV=development;
|
||||||
fi
|
fi
|
||||||
|
- if [[ -n "$TRAVIS_TAG" ]]; then export REACT_APP_ENV='production'; fi
|
||||||
- yarn build-storybook
|
- yarn build-storybook
|
||||||
- yarn build
|
- yarn build
|
||||||
# Pull Request - Deploy it to a review environment
|
# Pull Request - Deploy it to a review environment
|
||||||
|
|
Loading…
Reference in New Issue