This chapter shows how to integrate with FeaturePeek when using Heroku CI.
Example config file
If you already have your config file set up, simply add the FeaturePeek CI command as a test in your pipeline.
You may already have test scripts set up — in that case, you'll want to create a script that builds your frontend, pings FeaturePeek, and then runs your tests. It's recommended to ping FeaturePeek before running your test so that your deployment comes up faster.
/app.json file should contain a
test environment where you can run custom scripts. You'll need to build your frontend here, and then ping FeaturePeek. You can use the
test-setup key to build your frontend, and then the
test key to run our CI command.
You'll also need to add an environment variable called
GITHUB_SLUG. This value should be the URL to your repo, without the
https://github.com/ in the front. For example, if your repo URL is
GITHUB_SLUG should be
/app.json should look something like this:
Note: The command in the snippet above is just for static builds — if you are building a Docker image, you'll need to pass in more arguments.
Sample code repo
You can search the FeaturePeek org on GitHub to find sample repos of frontends that integrate FeaturePeek with Heroku. Be sure to visit the open pull requests to find links to running public FeaturePeek deployment.
Try it out
Try opening a new pull request that contain the changes in this chapter. When your CI finishes successfully, you should see the FeaturePeek bot comment a link on your pull request. If not, consult our Troubleshooting section.