Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Heroku review apps

Derek Yu edited this page Dec 5, 2017 · 5 revisions

Heroku reviews app

We currently use Heroku review apps to provide the PR automatic deployment to accelerate functional verification speed. The introduction can be found in here: Heroku review apps link

Access to the deployed app

  1. You must have a Heroku account. Follow this guide to create your account.
  2. Ash the collaborator permission in the Teams development channel.
  3. Download Heroku cli
  4. Run heorku login with your credential.

Get review apps information

The app name should start with terra-core-deployed and follow with the PR number. For example: terra-core-deployed-pr-326. example PR with review app

  1. To get bash on the review app.
  • heroku run -a terra-core-deployed-326 bash will give a bash by ssh.
  1. Get all logs for specified PR review app.
  • heroku logs -a terra-core-deployed-326 -n 1000 > log.file will output recent 1000 messages to your specifed log file in local. The messages are coming from Heroku log stream service(link).

Heroku config

  1. Heroku review apps require app.json to config dyno environment. Heroku doc and Terra-core config

  2. Add script into package.json to do prebuild work(install lerna) before npm run bootstrap.

  • "heroku-prebuild": "..."
  1. Add script into package.json to do postbuild work(install devDependencies and build assets) after npm install.
  • "heroku-postbuild": "..."
  1. Add engines into package.json to config node version to 6.9.4 .
"engines": {
  "node": "6.9.4"
},

Roll back in master app

In Heroku app activity tab, we can roll the master back to previous commit. activity tab

View review app pipeline in Heroku dashboard

  1. Heroku default dashboard. After you have been added as collaborator, you should see terra-core-deployed in your app list. dashboard
  2. After clicking the terra-core-deployed app, you will see all deployed apps. pipeline view
  3. Congratulations! You can manually control review apps building from here and view all building information. view review apps