From aaffad9d2be55d01848eec5ab56154010c3e0fe7 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Thu, 10 Nov 2016 10:10:35 +0100 Subject: [PATCH] Add script to fetch Redis URLs from Heroku (#783) The Heroku Redis URLs for the PR/beta/canary deployments change periodically, which breaks things until I manually update the Redis environment variables for the Travis environment. This obtains them at build time from Heroku instead. This also moves travis-web jobs onto the Trusty beta, because it includes the heroku command needed to fetch the Redis URLs. This has the added benefit of including PhantomJS 2.0.0, which comes pre-installed in that environment, so we no longer need the .travis.yml lines related to installing that. --- .travis.yml | 5 +---- config/deployment/deploy-pull-request.sh | 2 ++ config/deployment/deploy-test-master.sh | 2 ++ config/deployment/store-redis-urls.sh | 2 ++ package.json | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) create mode 100755 config/deployment/store-redis-urls.sh diff --git a/.travis.yml b/.travis.yml index 24b00a72e8..5111ea46aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ matrix: fast_finish: true sudo: false +dist: trusty cache: directories: @@ -22,10 +23,6 @@ cache: - bower_components before_install: - - mkdir travis-phantomjs - - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 - - tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs - - export PATH=$PWD/travis-phantomjs:$PATH - "npm config set spin false" - "npm install -g npm@^2" diff --git a/config/deployment/deploy-pull-request.sh b/config/deployment/deploy-pull-request.sh index 9edcdddeb5..024972302d 100755 --- a/config/deployment/deploy-pull-request.sh +++ b/config/deployment/deploy-pull-request.sh @@ -1,5 +1,7 @@ export CLEANED_BRANCH_SUBDOMAIN=`echo $TRAVIS_PULL_REQUEST_BRANCH | tr '.' '-' | tr '[:upper:]' '[:lower:]'` +./config/deployment/store-redis-urls.sh + ember deploy org-production-pull-request --activate --verbose TLD=org ENVIRONMENT=production ./config/deployment/update-github-status.sh diff --git a/config/deployment/deploy-test-master.sh b/config/deployment/deploy-test-master.sh index c8295ac6dd..ec69e3ff9a 100755 --- a/config/deployment/deploy-test-master.sh +++ b/config/deployment/deploy-test-master.sh @@ -1,5 +1,7 @@ export CLEANED_BRANCH_SUBDOMAIN=ember-$EMBER_VERSION export DISABLE_SENTRY=true +./config/deployment/store-redis-urls.sh + ember deploy org-$EMBER_VERSION --activate --verbose TRAVIS_PRO=true ember deploy com-$EMBER_VERSION --activate --verbose diff --git a/config/deployment/store-redis-urls.sh b/config/deployment/store-redis-urls.sh new file mode 100755 index 0000000000..c5883fba63 --- /dev/null +++ b/config/deployment/store-redis-urls.sh @@ -0,0 +1,2 @@ +export ORG_PRODUCTION_REDIS_URL=`heroku config:get REDIS_URL -a travis-web-production-next` +export COM_PRODUCTION_REDIS_URL=`heroku config:get REDIS_URL -a travis-pro-web-production-next` diff --git a/package.json b/package.json index 713e8c8a6f..65f9ec2459 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "ember-cli-babel": "^5.1.6", "ember-cli-dependency-checker": "^1.3.0", "ember-cli-deploy": "0.6.4", - "ember-cli-deploy-lightning-pack": "0.6.4", + "ember-cli-deploy-lightning-pack": "0.6.8", "ember-cli-deprecation-workflow": "0.2.3", "ember-cli-document-title": "0.3.3", "ember-cli-eslint": "3.0.0",