Skip to content

Commit

Permalink
Add script to fetch Redis URLs from Heroku (#783)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
backspace authored Nov 10, 2016
1 parent 617e193 commit aaffad9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ matrix:
fast_finish: true

sudo: false
dist: trusty

cache:
directories:
- node_modules
- 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"

Expand Down
2 changes: 2 additions & 0 deletions config/deployment/deploy-pull-request.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 2 additions & 0 deletions config/deployment/deploy-test-master.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions config/deployment/store-redis-urls.sh
Original file line number Diff line number Diff line change
@@ -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`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit aaffad9

Please sign in to comment.