Skip to content

Continuous Integration and Continuous Deployment

Kyriakos Chatzidimitriou edited this page Oct 9, 2018 · 2 revisions

What they are for and what tools to use.

Continuous Integration

When the team commits work it is nice to confirm immediately that the code committed works as expected. You also need to to avoid discussion like:

it works on my machine

Potential issues that works on your machine but not on others are:

  • Forgot to commit a new file
  • Forgot to save a dependency on package.json
  • Doesn't work crossplatform
  • Node version conflicts
  • Bad merge
  • Not running tests

The CI server will:

  • run an automated build
  • run the tests
  • check code coverage
  • automate deployment using a continuous deployment service

For open source projects, some free hosted CI solutions are Travis (for Linux/Mac) and Appveyor (for Windows).

Continuous Deployment

Usually the CI solutions offer also a CD solution. Following the 12factor app Build, Release, Run phases, the build phase creates all the artefacts, the build and the configuration (as env vars) make up the release, and the release runs on the server. Some rules: Code modification must follow the entire pipeline. Each release takes a unique identifier. One should be able to restart the Run without any modifications.

Monitoring

  • TrackJS
  • Sentry
  • New Relic
  • Raygun
  • Datadoghq