Experiment in setting up a complete serverless pipeline with testing, deployment and delivery on commit.

Using GitHub as public repo as CI/CD starts running on GitLab and give me a buffer for any possible credential mistakes.

Why

Couldn’t find a complete example/boilerplate for the whole CI/CD pipeline using Serverless framework. So I had to make one.

Complete meaning; build, test, deploy, and multiple environments all on commit. Check features on the README on the repo for the updated list of all the features.

Limitations

  • JavaScript runtime
  • Uses AWS services

TODO/Feature ideas

  • Possibly restructure folders
  • Consider using middy middleware for checking inputs and wrapping responses
  • Remove unneeded dependencies
  • Handle table names and other service references better
  • Look into adding a code quality scan on test stage
  • Look into adding a security scan on test stage
  • Maybe clean up Docker images for CI/CD
  • Would it be better to break down the severless.yml file into multiple pieces by feature and combine it back together?
  • Add monitoring
  • Add coverage badge/statistics
  • Hooking in a custom URL

Tech

  • GitLab: git repo and CI/CD tooling
  • Serverless Framework: generates cloud formation templates for AWS
  • Jest: For unit testing
  • Cypress: e2e testing after deployment against the API
bogdandrema at gmail dot com
Terms and conditions reserved