
Under the cut, you will find a translation of an introductory article that compares three systems of continuous integration: CircleCI, Travis CI and Jenkins.
Definition and purpose of CI
Continuous Integration (CI, Continuous Integration) is a software development practice in which code changes with high frequency are integrated into a common repository and verified using automated build.
Continuous integration is aimed at accelerating and facilitating the process of identifying problems encountered in the process of software development. With regular integration of changes, the one-time scope of checks is reduced. As a result, debugging takes less time, which can be redistributed to add new features. It is also possible to add a check of code style, cyclomatic complexity (the lower the complexity, the easier it is to test) and other types of controls. This simplifies code review, saves time and improves code quality.
How it works

- Developers check the code locally on their computers.
- Then the changes are sent to the common repository.
- The repository sends a request (webhook) to the CI system.
- The CI server runs the task (tests, coverage, syntax checking, etc.).
- The CI server stores artifacts and releases a release for testing.
- In case of assembly errors or testing, the CI server notifies the command.
- The team corrects the problem.
CircleCI vs Travis CI vs Jenkins
I hope that now the process of continuous integration is generally understood, and we can move on to comparing several currently popular CI platforms, each of which has its own advantages and disadvantages. Let's start with CircleCI.
CircleCI

')
Functions:
- CircleCI is a cloud system for which you do not need to set up a separate server and that you do not have to administer. However, there is also a local version that you can deploy in a private cloud.
- Even for commercial use there is a free version.
- Using the REST API, you can access projects, builds and artifacts. The result of the assembly is an artifact or a group of artifacts. The artifact can be a compiled application or executable files (for example, APK for Android) or metadata (for example, information about successfully completed testing).
- CircleCI caches third-party dependencies, thus avoiding the constant installation of the necessary environments.
- It is possible to connect to the container via SSH. This may be necessary if there are any problems.
- CircleCI is a complete solution that requires minimal configuration.
CircleCI is compatible with:
- Python, Node.js, Ruby, Java, Go, etc .;
- Ubuntu (12.04, 14.04), Mac OS X (paid accounts);
- Github, Bitbucket;
- AWS, Azure, Heroku, Docker, dedicated server;
- Jira, HipChat, Slack.
Advantages of CircleCI:
- easy and quick start;
- free version for commercial use;
- small and easy to read configuration files in YAML format;
- no need for a dedicated server CircleCI.
CircleCI Disadvantages:
- CircleCI in the free version only supports Ubuntu 12.04 and 14.04. To use MacOS will have to pay;
- Although CircleCI can work with any programming languages, only Go (Golang), Haskell, Java, PHP, Python, Ruby / Rails, Scala are supported out of the box;
- if you want to customize the system for yourself, in some cases problems may arise, and then third-party software will be needed to achieve the goal.
Also, despite the fact that cloud systems have undoubted advantages, you need to be prepared for the fact that at any moment the function you need can be removed, and you cannot do anything about it.
Travis ci

Travis CI and CircleCI are very similar.
Both systems:
- use configuration files in YAML format;
- deployed in the cloud;
- Docker support to run tests.
What is in TravisCI and not in CircleCI?
- Running tests simultaneously under Linux and Mac OS X.
- Support for more out-of-box languages:
Android, C, C #, C ++, Clojure, Crystal, D, Dart, Erlang, Elixir, F #, Go, Groovy, Haskell, Haxe, Java, JavaScript (with Node.js), Julia, Objective-C, Perl, Perl6, PHP, Python, R, Ruby, Rust, Scala, Smalltalk, Visual Basic. - Build matrix support
Build matrix
language: python python: - "2.7" - "3.4" - "3.5" env: - DJANGO='django>=1.8,<1.9' - DJANGO='django>=1.9,<1.10' - DJANGO='django>=1.10,<1.11' - DJANGO='https://github.com/django/django/archive/master.tar.gz' matrix: allow_failures: - env: DJANGO='https://github.com/django/django/archive/master.tar.gz'
Build matrix is a tool that allows you to perform tests using different versions of languages and packages. It has rich customization capabilities. For example, if unsuccessful builds in some environments, the system may issue a warning, but the entire assembly will not be considered unsuccessful (this is convenient when using dev-versions of packages).
TOX
If you prefer any other CI platform, you can create a Build Matrix using Tox.
[tox] envlist = py{27,34,35}-django{18,19,110,master} [testenv] deps = py{27,34,35}: -rrequirements/test.txt django18: Django>=1.8,<1.9 django19: Django>=1.9,<1.10 django110: Django>=1.10,<1.11 djangomaster: https://github.com/django/django/archive/master.tar.gz commands = ./runtests.py [testenv:py27-djangomaster] ignore_outcome = True
Tox is a versatile console tool for managing packages and testing them in virtualenv. It can be installed using pip install tox or easy_install tox .
Advantages of Travis CI:
- build matrix "out of the box";
- fast start;
- small and easy to read configuration files in YAML format;
- free version for open source projects;
- no need for a dedicated server.
Disadvantages of Travis CI:
- compared to CircleCI prices are higher, there is no free version for commercial use;
- limited configuration options (some things may require third-party software).
Jenkins

Opportunities:
- Jenkins is a standalone Java application that can run on Windows, Mac OS X, and other unix-like operating systems.
- You can find hundreds of plug-ins in the Update Center, so Jenkins integrates with almost any tool related to continuous integration and continuous delivery.
- Jenkins capabilities can be expanded virtually unlimited thanks to the plugin connection system.
- There are various modes: Freestyle project, Pipeline, External Job, Multi-configuration project, Folder, GitHub Organization, Multibranch Pipeline.
- Jenkins Pipeline is a collection of plugins that support the creation and integration of continuous supply chains into Jenkins. Pipeline provides an extensible set of tools for modeling supply chains of the "as code" type of varying degrees of complexity using Pipeline DSL.
- Allows you to run assemblies with various conditions.
- Jenkins can work with Libvirt, Kubernetes, Docker, etc.
- Using the REST API, you can control the amount of data received, get / update config.xml, delete jobs (job), get all assemblies, get / update job descriptions, build, enable / disable jobs.
Jenkins advantages:
- price (it is free);
- customization options;
- plugin system;
- full control over the system.
Disadvantages of Jenkins:
- a dedicated server (or several servers) is required, which entails additional costs for the server itself, DevOps, etc .;
- it takes time to set up.
Conclusion
What system CI to choose? It depends on your needs and the intended use of this tool.
CircleCI is well suited for small projects where the main task is to launch continuous integration as quickly as possible.
Travis CI is recommended primarily for open-source projects that need to be tested in various environments.
I would advise Jenkins for large projects that require serious system configuration when working on them (in the case of Jenkins, this is done using plug-ins). In Jenkins, you can change almost anything, but it will take time. If you want to quickly run the CI chain, Jenkins may not be suitable.
References:
- Original: Continuous Integration. CircleCI vs Travis CI vs Jenkins .