Pinging FeaturePeek is single-step command in your Continuous Integration pipeline. The command downloads and executes a bash script that is hosted on FeaturePeek's servers, so you should be able to ping FeaturePeek no matter which Continuous Integration service you use.
The syntax of the command varies based on whether you are building static assets or a Docker container.
Important: Ping FeaturePeek in CI after your front-end builds.
For projects that build static assets, simply run the command after your build phase in CI with no extra arguments:
bash <(curl -s https://peek.run/ci)
The bash script will read the path present in your
peek.yml file to find the assets to send over to FeaturePeek. Other information like branch name and pull request build number are present in your CI's environment variables, so you don't need to pass them in manually.
For projects that build with Docker, there are a few optional arguments you can include when running the CI command which give FeaturePeek more context in the location of your built image.
bash <(curl -s https://peek.run/ci) \ -i my-image-name \ -r my.registry.io \ -t latest
This is the name of your built image. It should be the same name of the image you push to your container registry.
If you are using a different registry that is not the usual or default, you can change it here. Consult your registry under Container Registries in the left sidebar to find the default domain of your container registry service.
This is the tag you use when building and pushing your image. Usually it includes the
sha of the commit hash. It should match whatever you push to your container registry.
Note: You'll need to ensure that you have certain environment variables set in your CI service so that FeaturePeek has the credentials to pull your images from your registry. Find your container registry in the left sidebar to learn which environment variables are required.
When to run the CI command
Ping FeaturePeek after your app builds, but before any unit or integration tests occur. For the fastest possible spin up times, you'll want to remove any extraneous steps that occur before your build phase. If your CI system supports it, put tests in a parallel job so that your build phase and test phase occur in parallel. That way, your FeaturePeek environment will be ready as quickly as possible.