From 0dfb1d6d817fa6d632c8e3cd8cb7f1cd4ed78250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Albela=20P=C3=A9rez?= <3659067+davidalbela@users.noreply.github.com> Date: Thu, 26 Sep 2019 11:41:33 +0200 Subject: [PATCH] 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. --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f6e25a7d..62caa8ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,20 +9,20 @@ node_js: os: - linux env: - - DOCKER_COMPOSE_VERSION=1.22.0 + global: + - DOCKER_COMPOSE_VERSION=1.22.0 matrix: include: - env: - REACT_APP_NETWORK='mainnet' - STAGING_BUCKET_NAME=${STAGING_MAINNET_BUCKET_NAME} - before_install: - - if [[ "$TRAVIS_BRANCH" == "development" ]]; then exit 0; fi + if: branch = master OR tag IS present - env: - REACT_APP_NETWORK='rinkeby' before_install: # Install custom docker-compose version - 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 - sudo mv docker-compose /usr/local/bin # Shut down postgres because it blocks our db container's port map to :5432 @@ -59,6 +59,7 @@ after_success: else export NODE_ENV=development; fi + - if [[ -n "$TRAVIS_TAG" ]]; then export REACT_APP_ENV='production'; fi - yarn build-storybook - yarn build # Pull Request - Deploy it to a review environment