Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neverendingqs/netlify-deployment-hours-plugin
Block deployment if it is outside of deployment hours.
https://github.com/neverendingqs/netlify-deployment-hours-plugin
netlify netlify-plugin
Last synced: 3 days ago
JSON representation
Block deployment if it is outside of deployment hours.
- Host: GitHub
- URL: https://github.com/neverendingqs/netlify-deployment-hours-plugin
- Owner: neverendingqs
- License: apache-2.0
- Created: 2019-11-16T23:06:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T20:17:24.000Z (over 1 year ago)
- Last Synced: 2024-10-29T20:57:21.800Z (15 days ago)
- Topics: netlify, netlify-plugin
- Language: JavaScript
- Homepage:
- Size: 717 KB
- Stars: 10
- Watchers: 3
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![CircleCI](https://circleci.com/gh/neverendingqs/netlify-deployment-hours-plugin.svg?style=svg)](https://circleci.com/gh/neverendingqs/netlify-deployment-hours-plugin)
[![npm
version](https://badge.fury.io/js/netlify-deployment-hours-plugin.svg)](https://badge.fury.io/js/netlify-deployment-hours-plugin)
[![Coverage Status](https://coveralls.io/repos/github/neverendingqs/netlify-deployment-hours-plugin/badge.svg?branch=master)](https://coveralls.io/github/neverendingqs/netlify-deployment-hours-plugin?branch=master)# 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:
```toml
[[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` required to configure this plugin:
```toml
[[plugins]]
package = "netlify-deployment-hours-plugin"[plugins.inputs]
# Optional: a comma-separated list of deploy contexts this plugin should monitor (default: "production")
contexts = "production" # default value
# 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](https://github.com/neverendingqs/cron-allowed-range) to
determine if a deployment should proceed. See the [`cron-allowed-range`
documentation](https://github.com/neverendingqs/cron-allowed-range) for more
details on how to form the cron-like expression.The required `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`
```