Continuous Integration and Delivery (CI/CD)


Use Calibre as part of your CI/CD workflow to automate performance monitoring before code reaches production. Calibre's CLI makes it easy to integrate with your existing CI/CD workflow, no matter what tools you use.

Integrating with CI/CD

CLI is built with automation in mind, and can be used for a variety of use cases.

Prerequisites

With those details in place, you will be able to integrate Calibre’s performance system in tandem with your CI/CD workflow.

Pull Request Reviews

Pull Request Reviews are a way for Calibre to compare production (or another environment) to a preview deployment (e.g.: your work-in-progress branch).

Each Pull Request review generates a comparison report that can be used to make decisions about whether to merge the branch or not.

Running Pull Request Reviews comes down to 3 steps:

  • Deploy your code to a preview environment URL. Each deployment must have a unique hostname (e.g.: my-preview-url-123.example.com).
  • Create a Pull Request Review using npx calibre site create-pull-request-review, passing in the preview environment URL and details of the Pull Request.
  • Assess the performance report (available as Markdown or JSON) and make relevant decisions about merging the branch.

Once you have a completed Pull Request Review, you can display the Markdown report to your team, use the JSON report to integrate with other tools, or fail builds based on predefined performance budgets.

Advanced Pull Request Review configuration

Advanced configuration can be set for Pull Request Reviews with --config=./.calibre/config.yml. For detailed configuration options including authentication, headers, cookies, and branch-specific settings, see the Pull Request Review Configuration page.

Run a Snapshot following a deployment

Running a Snapshot following a deployment of your Site is a way to ensure that your code is performing as expected in production. Snapshots can be triggered by a variety of events, such as a merge to the main branch, or a new release being published.

Notify Calibre of a deployment

You can notify Calibre of a deployment to your Site. This is useful for correlating performance changes with code changes over time.