netlify-build-plugin-perfbeacon v1.0.4
Netlify PerfBeacon Deploy Plugin
This is a Build Plugin for Netlify that uses the PerfBeacon API to automatically trigger a round of tests after a successful build has occured.
At present, this build plugin will only run when Netlify's CONTEXT variable is production
.
Usage
- Install the plugin using
yarn
:
yarn add netlify-build-plugin-perfbeacon
- Update your
netlify.toml
configuration file to reference the plugin in your plugins section:
[[plugins]]
package = "netlify-build-plugin-perfbeacon"
Grab your PerfBeacon Token (See Tokens page) and the ID for the site you want to test (under Sites > Settings) and store them as environmental variables inside of Netlify. Save them as PERFBEACON_TOKEN and PERFBEACON_SITE_ID.
Using the latest version of the Netlify CLI, run a dry build:
netlify build --dry
If you see Plugin netlify-build-plugin-perfbeacon
attached to the onSuccess
lifecycle, you should be all set.
Every deployment will track your changes in PerfBeacon.
Credits
Inspired by Tim Kadlec's work for SpeedCurve: https://github.com/tkadlec/netlify-build-plugin-speedcurve