serverless-ci-cd

1.2.2 • Public • Published

serverless-ci-cd

NPM JavaScript Style Guide

Install

using npm

npm install --save serverless-ci-cd

using yarn

yarn add  serverless-ci-cd

Usage

This lib help you setup ci/cd workflow . In the build step you dont need to specify the stage name . In the release step you will use the artifacts generate in the build step to deploy in your prefer stage (dev , prod , ...)

Configuration

plugins:
  - serverless-ci-cd
  
custom:
  stage: ${opt:stage, self:provider.stage}
  region: ${opt:region, self:provider.region}
    

commande

for build step :

sls package-ci  --verbose

for release step :

sls deploy-cd --package .serverless -r eu-west-1 --stage prod --verbose

Serverless.yml Example

service: serverless-ci-cd-example
 
plugins:
  - serverless-ci-cd
 
custom:
  stage: ${opt:stage, self:provider.stage}
  region: ${opt:region, self:provider.region}
 
provider:
  name: aws
  runtime: nodejs6.10
  environment:
    queue_name: {Ref ExampleQueue}
 
functions:
  example:
    handler: functions/example.handle
    events:
      http:
          path: example
          method: get
          cors: true
 
resources:
  Resources:
    ExampleQueue:
      Type: AWS::SQS::Queue
      Properties:
        QueueName: example-queue-${self:custom.stage}
 

Package Sidebar

Install

npm i serverless-ci-cd

Weekly Downloads

0

Version

1.2.2

License

MIT

Unpacked Size

4.16 kB

Total Files

3

Last publish

Collaborators

  • ysfmag