Super simple serverless plugin for validating stage names before deployment
Switch branches/tags
Nothing to show
Clone or download
Latest commit 346fc54 Mar 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore v1.0.0 Oct 20, 2017
README.md documentation typo Mar 2, 2018
index.js bugfix: default stage not resolving correctly Oct 24, 2017
package.json version bump Mar 2, 2018

README.md

serverless-stage-manager

Super simple serverless plugin for validating stage names before deployment.

Serverless npm npm

Installation

Install using Serverless plugin manager

serverless plugin install --name serverless-stage-manager

Install using npm

Install the module using npm:

npm install serverless-stage-manager --save-dev

Add serverless-stage-manager to the plugin list of your serverless.yml file:

plugins:
  - serverless-stage-manager

Configuration

Add a stages value in the custom section of your serverless.yml file and specify an array of valid stage names.

custom:
  stages:
    - dev
    - staging
    - prod

Usage

When running serverless deploy or serverless deploy function, it will check to make sure it is a valid stage name before continuing. For example:

# Given the above configuration of dev, staging & prod

# These will work
serverless deploy -s prod
serverless deploy -s staging
serverless deploy function -f funcName -s dev
serverless deploy # assuming default stage is in custom.stages config

# These will fail
serverless deploy -s foo
serverless deploy function -f funcName -s bar