/circleci-rebuild-serverless

A Serverless AWS Lambda function that runs once per day and rebuilds a set of CircleCI projects

Primary LanguageJavaScriptApache License 2.0Apache-2.0

CircleCI-Rebuild-Serverless

A Serverless AWS Lambda function that runs once per day and rebuilds a set of CircleCI projects

Setup

(Assuming you have your AWS access credentials already setup).

  1. Run:
git clone git@github.com:conoro/circleci-rebuild-serverless.git.git
cd circleci-rebuild-serverless.git
npm install -g serverless
npm install
  1. Rename serverless-sample.env.yml to serverless.env.yml
  2. Edit serverless.env.yml and configure your access token, username, scm and list of projects to build
  3. Then run:
npm run compile
serverless deploy

Notes:

  1. You can also invoke it manually by accessing the GET URL returned by the successful serverless deploy
  2. You can check manually invoked logs with:
serverless logs -f check

and Cron logs with

serverless logs -f cron
  1. If you make minor changes to just the function code, you can do a quick re-deploy with:
serverless deploy function -f check
  1. You can run it locally with
serverless invoke local --function check
  1. It's using Babel to enable the use of async/await on Node 6 on Lambda. This will be removed when Node 8 is released on Lambda. LICENSE Apache-2.0

Copyright Conor O'Neill 2017, conor@conoroneill.com