This chapter shows how to integrate with FeaturePeek when using the Cirrus CI continuous integration service.
Configure application from GitHub Marketplace
Start by configuring the Cirrus CI application from the GitHub Marketplace. This is where you'll grant permission on either your repo or your org for Cirrus to listen to your pull request events. If you already have Cirrus set up, you can skip this step.
Example config file
If you already have your config file set up, simply append the FeaturePeek CI script after your build phase.
If you don't have your config file set up yet, take a look at these examples provided by Cirrus CI to get started.
/.cirrus.yml file should look something like this:
# /.cirrus.yml container: image: node:latest check_task: node_modules_cache: folder: node_modules fingerprint_script: cat yarn.lock populate_script: yarn install build_script: yarn build featurepeek_script: bash <(curl -s https://peek.run/ci)
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 front-ends that integrate FeaturePeek with Cirrus CI. Be sure to visit the open pull requests to find links to running public FeaturePeek environments.
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.