Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olavoparno/should-i-deploy-today
Should I deploy today? Use it in your CI/CD environment or simply for fun
https://github.com/olavoparno/should-i-deploy-today
ci deploy fun pipeline
Last synced: 2 days ago
JSON representation
Should I deploy today? Use it in your CI/CD environment or simply for fun
- Host: GitHub
- URL: https://github.com/olavoparno/should-i-deploy-today
- Owner: olavoparno
- Created: 2021-08-29T04:42:46.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2021-08-29T16:45:17.000Z (over 3 years ago)
- Last Synced: 2025-01-03T01:18:07.969Z (6 days ago)
- Topics: ci, deploy, fun, pipeline
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/should-i-deploy-today
- Size: 464 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Should I deploy today CI/CD
> Should I deploy today? Use it in your CI/CD environment or simply for fun.
| Statements | Branches | Functions | Lines |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg) |---
## Table of Contents
- [Practical example](#practical-example)
- [Installation](#installation)
- [Simple Usage](#simple-usage)
- [Advanced Usage](#advanced-usage)
- [License](#license)## Practical example
![Example](./assets/practical-example.png)
---
## Installation
- Install the library in your project as a devDependency:
```bash
npm i -D should-i-deploy-today
```---
## Simple Usage
- Simply run it from the CLI as follows to see whether you should or should not deploy today:
```bash
npm run should-i-deploy-today
```---
## Advanced Usage
- Want it to throw an error on your CI/CD environment? Use **--ci** argument:
```bash
npm run should-i-deploy-today --ci
```- You may also use **CI=true** instead:
```bash
CI=true npm run should-i-deploy-today --ci
```> Output example from a [pipeline](https://github.com/olavoparno/should-i-deploy-today/runs/3455432573?check_suite_focus=true) run on Sunday:
```shell
You should not deploy. I see you deployed on Friday
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm run shouldIDeploy`
npm ERR! Exit status 1
```---
- Want it without logging? Try silent mode with **--silent** argument (note this only works alongside CI option):
```bash
npm run should-i-deploy-today --ci --silent
```> Output example with --silent option (only throws without logging the message):
```shell
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm run shouldIDeploy`
npm ERR! Exit status 1
```---
## License
should-i-deploy-today is [MIT licensed](./LICENSE).