This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 165
Heroku review apps
Derek Yu edited this page Dec 5, 2017
·
5 revisions
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
- You must have a Heroku account. Follow this guide to create your account.
- Ash the collaborator permission in the Teams development channel.
- Download Heroku cli
- Run
heorku login
with your credential.
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
- To get bash on the review app.
-
heroku run -a terra-core-deployed-326 bash
will give a bash by ssh.
- 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 review apps require
app.json
to config dyno environment. Heroku doc and Terra-core config -
Add script into package.json to do
prebuild
work(install lerna) beforenpm run bootstrap
.
"heroku-prebuild": "..."
- Add script into package.json to do
postbuild
work(install devDependencies and build assets) afternpm install
.
"heroku-postbuild": "..."
- Add
engines
into package.json to config node version to 6.9.4 .
"engines": {
"node": "6.9.4"
},
In Heroku app activity tab, we can roll the master back to previous commit.
- Heroku default dashboard. After you have been added as collaborator, you should see
terra-core-deployed
in your app list. - After clicking the
terra-core-deployed
app, you will see all deployed apps. - Congratulations! You can manually control review apps building from here and view all building information.