A review app is a temporary application created to help you review in-progress code changes. You’ll use a review app because you’re working on a code branch and want to see what the changes will be like in a production-like environment, or because you’re reviewing a pull or merge request from someone else.
Gitlab doesn’t explicitly outline how to setup review apps with Heroku, but the Heroku API is well-documented, and it’s quite straightforward to get this up and running. You’ll need to set up a few environment variables. And make sure that the length of your branch name and your project name is no greater than 29 characters (heroku has an app name length limit).
To create a review app:
- The interesting things happen inside (Inside start_review_scripts.bash)
- Create a new app with a URL derived from the name of the code branch
- Get the right git branch, then push it to heroku.
To delete the review app:
- Delete the app