GithubHelp home page GithubHelp logo

mscifo / serverless-aws-ci Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 15 KB

Create a CI pipeline using AWS CodePipeline and AWS CodeBuild to automatically deploy your Serverless project when changes are committed.

License: MIT License

JavaScript 100.00%

serverless-aws-ci's Introduction

serverless-aws-ci

serverless npm version MIT licensed

Create a CI pipeline using AWS CodePipeline and AWS CodeBuild to automatically deploy your Serverless project when changes are committed.

Getting Started

Prerequisites

Make sure you have the following installed before starting:

The AWS credentials used to create the CI pipeline via the serverless command will need the following permissions:

cloudformation:DescribeStackResources
codebuild:CreateProject
codebuild:ListBuilds
codepipeline:CreatePipeline

The IAM role (specified via the custom.awsCI.roleArn configuration) that AWS CodePipeline and AWS CodeBuild will assume will need to be assigned the AWSCodeBuildDeveloperAccess policy AND be assigned the following permissions:

logs:CreateLogGroup
logs:CreateLogStream

Installing

# From npm (recommended)
npm install serverless-aws-ci

# From github
npm install https://github.com/mscifo/serverless-aws-ci.git

Then make the following edits to your serverless.yml file:

plugins:
  - serverless-aws-ci

custom:
  awsCI:
    roleArn:  # (required) the AWS ARN for the role CodePipeline/CodeBuild will assume

Running

To create the pipeline (you only need to run this once per branch/stage):

serverless awsci -g [GITHUB_OWNER/GITHUB_REPO] -b [GITHUB_BRANCH] -t [GITHUB_PERSONAL_ACCESS_TOKEN] -s [STAGE]

Be sure to commit the created buildspec.yml so the pipeline will know how to deploy your Serverless project.

Running Tests

To run the test:

npm test

All tests should pass.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.