Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

netlify-deployment-hours-plugin

0.0.10 • Public • Published

CircleCI npmversion

netlify-deployment-hours-plugin

A Netlify build plugin that blocks deployment if it is outside of deployment hours.

Usage

To install, add the following lines to your netlify.toml file:

[[plugins]]
package = "netlify-deployment-hours-plugin"

Note: The [[plugins]] line is required for each plugin, even if you have other plugins in your netlify.toml file already.

There are two inputs used to configure this plugin:

[[plugins]]
package = "netlify-deployment-hours-plugin"
 
  [plugins.inputs]
  # A cron-like expression that expresses when a deployment can occur
  expression = "* * * * *"
  # tz database value that expresses the timezone of the expression
  timezone = "America/Toronto"

Both are passed into cron-allowed-range to determine if a deployment should proceed. See the cron-allowed-range documentation for more details on how to form the cron-like expression.

The inputs can be overridden with environment variables for scenarios where emergency deploys were required outside of regular deployment hours:

* `DEPLOYMENT_HOURS_EXPRESSION`
* `DEPLOYMENT_HOURS_TIMEZONE`

Install

npm i netlify-deployment-hours-plugin

DownloadsWeekly Downloads

36

Version

0.0.10

License

Apache-2.0

Unpacked Size

17 kB

Total Files

8

Last publish

Collaborators

  • avatar