未加星标

Continuous Integration. CircleCI vs TravisCI vs Jenkins

字体大小 | |
[开发(python) 所属分类 开发(python) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏
CI definition and its main goal

Continuous Integration (CI) is a software development practice that is based on a frequent integration of the code into a shared repository. Each check-in is then verified by an automated build.

The main goal of continuous integration is to identify the problems that may occur during the development process earlier and more easily. If you integrate regularly ― there is much less to check while looking for errors. That results in less time spent for debugging and more time for adding features. There is also an option to set up inspection of the code style, cyclomatic complexity (low complexity makes the testing process more simple) and other checks. That helps to minimize the efforts of the person responsible for the code review, saves time, and improves the quality of the code

How it works
Continuous Integration. CircleCI vs TravisCI vs Jenkins
Developers check the code locally on their computers When completed ― they commit changes to the repository Repository sends a request (webhook) to CI system CI server runs job (tests, coverage, check syntax and others) CI server releases saved artifacts for testing If the build or tests fail, the CI server alerts the team The team fixes the issue CircleCi vs TravisCi vs Jenkins

Now, when the process of continuous integration is clear (I hope so) we can move to the comparison of some of the most popular CI platforms nowadays. Each of those has its pros and cons. Let’s start with CircleCI.

CircleCI
Continuous Integration. CircleCI vs TravisCI vs Jenkins
Features : CircleCI is a cloud-based system ― no dedicated server required, and you do not need to administrate it It has a free plan even for a business account Rest API ― you have an access to projects, build and artifacts. The result of the build is going to be an artifact or the group of artifacts. Artifacts could be a compiled application or executable files (e.g. android APK) or metadata (e.g. information about the tests`success). CircleCI caches requirements installation. It checks 3rd party dependencies instead of constant installations of the environments needed. You can trigger SSH mode to access container and make your own investigation (in case of any problems appear). That’s a complete out of a box solution that needs minimal configuration\adjustments. 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 CircleCI Pros: Fast start CircleCI has a free plan for enterprise projects. It’s easy and fast to start. Lightweight, easily readable YAML config You do not need any dedicated server to run CircleCI CircleCI Cons:

CircleCI supports only 2 versions of Ubuntu for free (12.04 и 14.04) and MacOS as a paid part

It supports only the following programming languages:

Go (Golang), Haskell, Java,php, Python, Ruby/Rails, Scala

Some problems may appear in case you would like to make customizations: you may need some 3rd party software to make those adjustments.

Also, while being a cloud-based system is a plus from one side, it can also stop supporting any software, and you won't be able to prevent that.

TravisCI
Continuous Integration. CircleCI vs TravisCI vs Jenkins
TravisCI and CircleCI are almost the same. Both of them: Have YAML file as a config Are cloud-based Have support of Docker to run tests What does TravisCI offer that CircleCI doesn’t?

Option to run tests on linux and Mac OS X at same time

Supports more languages out of the box:

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

Support of build matrix 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 gives an opportunity to run tests with different versions of language and packages. You may customize it in different ways. For example, fails of some environments can trigger notifications but don't fail all the build ( that’s helpful for development versions of packages)

TOX

In case you prefer any other CI platform ― there is always an option to create a Build Matrix by 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 generic virtualenv management and test command line tool. You may install it by using pip install tox or easy_install tox command.

TravisCI Pros: Build matrix out of the box Fast start Lightweight YAML config Free plan for open-sourced projects No dedicated server required TravisCI Cons:

Price is higher compared to CircleCI, no free enterprise plan.

Customization (for some stuff you’ll need 3rd parties)

Jenkins
Continuous Integration. CircleCI vs TravisCI vs Jenkins
Features:

Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for windows, Mac OS X and other Unix-like operating systems

With hundreds of plugins in the Update Center, Jenkins integrates with practically every tool in the continuous integration and continuous delivery toolchain.

Jenkins can be extended via its plugin architecture, providing nearly infinite possibilities for what Jenkins can do.

Various job modes: Freestyle project, Pipeline, External Job, Multi-configuration project, Folder, GitHub Organization, Multibranch Pipeline.

Jenkins Pipeline. That's a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. Pipeline provides an extensible set of tools for modeling simple-to-complex delivery pipelines "as code" via the Pipeline DSL.

Allows you to launch builds with various conditions.

You can run Jenkins with Libvirt, Kubernetes, Docker, and others.

Rest API - have access to Controlling the amount of data you fetch, Fetch/Update config.xml, Delete a job, Retrieving all builds, Fetch/Update job description, Perform a build, Disable/Enable a job.

Jenkins Pros: Price (it’s free) Customization Plugins system Full control of the system Jenkins Cons: Dedicated server (or several servers) are required. That results in additional expenses. For the server itself, DevOps, etc... Time needed for configuration / customization Conclusion

What CI system to chose? That depends on your needs and the way you are planning to use it.

CircleCI is recommended for small projects, where the main goal is to start the integration as fast as possible.

TravisCI is recommended for cases when you are working on the open-source projects, that should be tested in different environments.

Jenkins is recommended for the big projects, where you need a lot of customizations that can be done by usage of various plugins. You may change almost everything here, still this process may take a while. If you are planning the quickest start with the CI system Jenkins might not be your choice.

本文开发(python)相关术语:python基础教程 python多线程 web开发工程师 软件开发工程师 软件开发流程

主题: JavaDockerDjangoRubyPHPNode.jsPerlUbuntuScalaGit
分页:12
转载请注明
本文标题:Continuous Integration. CircleCI vs TravisCI vs Jenkins
本站链接:http://www.codesec.net/view/531641.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 开发(python) | 评论(0) | 阅读(117)