Carefully choose your CI platform

One Paragraph Explainer

The CI world used to be the flexibility of Jenkins vs the simplicity of SaaS vendors. The game is now changing as SaaS providers like CircleCI and Travis offer robust solutions including Docker containers with minimum setup time while Jenkins tries to compete on ‘simplicity’ segment as well. Though one can setup rich CI solution in the cloud, should it required to control the finest details Jenkins is still the platform of choice. The choice eventually boils down to which extent the CI process should be customized: free and setup free cloud vendors allow to run custom shell commands, custom docker images, adjust the workflow, run matrix builds and other rich features. However, if controlling the infrastructure or programming the CI logic using a formal programming language like Java is desired - Jenkins might still be the choice. Otherwise, consider opting for the simple and setup free cloud option

Code Example – a typical cloud CI configuration. Single .yml file and that’s it

  1. version: 2
  2. jobs:
  3. build:
  4. docker:
  5. - image: circleci/node:4.8.2
  6. - image: mongo:3.4.4
  7. steps:
  8. - checkout
  9. - run:
  10. name: Install npm wee
  11. command: npm install
  12. test:
  13. docker:
  14. - image: circleci/node:4.8.2
  15. - image: mongo:3.4.4
  16. steps:
  17. - checkout
  18. - run:
  19. name: Test
  20. command: npm test
  21. - run:
  22. name: Generate code coverage
  23. command: './node_modules/.bin/nyc report --reporter=text-lcov'
  24. - store_artifacts:
  25. path: coverage
  26. prefix: coverage

Circle CI - almost zero setup cloud CI

alt text

Jenkins - sophisticated and robust CI

alt text