Continuos Integration as a Martial Art

Few months ago I read a great article that was suggesting a journey for CI comparing it with the different steps in learning Karate.

Unfortunately the article was in Spanish so I couldn’t share it right away, but I decided to take some minutes this morning and come up with a rough translation for y’all.

Original Article from Martin Salias: http://www.codeandbeyond.org/2016/05/el-kyu-dan-de-la-integracion-continua.html

* In case you are a Karate guru on the team , the belt colors may be out of order or just wrong :) *

White Belt

  • Install Team City or Jenkins
  • Every team should learn how to configure their own projects
  • Each commit has to automatically compile
  • Projects in RED are not allowed

Yellow Belt

  • Start with tests and run them with every commit
  • Again, projects in RED are not allowed, use this opportunity to learn what the others are doing and stabilize the tests

Orange Belt

  • Start with TDD and ATDD, increase the number of tests too
  • Start measuring code coverage and enforcing it (at least 1% for each new class)
  • Start increasing the code coverage limit, if the code coverage is not satisfied the project should go in RED
  • Every time a bug is reported in test or prod, write the test to demonstrate the issue first, and then fix it

Green Belt

  • Start executing static code analyzer and have the build server reporting on them
  • Focus on the main issues reported, and once fixed, start enforcing code quality (project goes into RED if it is not passing)

Blue Belt

  • Start versioning code together with database migrations, configurations and libraries
  • Make the build server compile, run all the tests and validations and generate a new testing environment from scratch

Brown Belt

  • Work with dev ops and web ops to validate and adopt environment deployment scripts and processes
  • Have the build server create a test environment from scratch with every commit and also an incremental one (upgrade/update)
  • Automatic rollbacks in the incremental environment using scripts

Red Belt

  • Every time there is a commit and all tests and validations pass, generate a package that can be deployed to production with the click of a button.
  • Start working on hot-deploy , non user impacting , deployment automation

Black Belt

  • Every time there is a commit, goes to production without interrupting the service