Учебники

8) Дженкинс против Тревис-CI

What is CI?

Непрерывная интеграция — это метод разработки программного обеспечения, при котором члены команды могут интегрировать свою работу хотя бы раз в день. В этом методе каждая интеграция проверяется автоматической сборкой для поиска ошибки. Концепция CI была впервые введена более двух десятилетий назад, чтобы избежать «ада интеграции», который происходит, когда интеграция откладывается до конца проекта.

В этом уроке вы узнаете

Как работает CI?

  • Разработчики пишут код и фиксируют изменения в общем хранилище
  • После этого CI-сервер контролирует хранилище и оценивает все изменения.
  • CI строит систему и проводит интеграционные и модульные тесты
  • Сервер выпускает развертываемые артефакты
  • Сервер непрерывной интеграции назначает тег сборки версии и коду сборки
  • Затем CI-сервер сообщает команде об успешной сборке. Если тесты не пройдены, сервер сообщает о событии команде разработчиков. Команда исправит проблемы как можно быстрее.

Что такое Трэвис CI?

Travis CI был первым CI в качестве инструмента обслуживания. Он представил новый подход к созданию кода в облаке. Этот инструмент CI позволяет пользователю зарегистрироваться, связать свой репозиторий, собрать, а также протестировать свои приложения.

Инструмент Travis CI может легко интегрироваться с обычными облачными хранилищами, такими как GitHub и Bitbucket. Он предлагает множество автоматических опций CI, которые устраняют необходимость в выделенном сервере, поскольку сервер Travis CI размещается в облаке. Это позволяет тестировать в разных средах, на разных машинах, работающих в разных операционных системах.

Travis CI is free for open source projects. For commercial projects, you need to purchase an enterprise plan.

What is Jenkins?

Jenkins is an award-winning continuous integration tool that monitors executions of deployment cycles. It started as a side project by Sun’s software engineers group. Later it was expanded as one of the popular open source CI tools which help software development teams to automate their deployments.

Jenkins is a Java-based tool, which means you only need Java Runtime Environment to operate it. Hence, Jenkins can be installed on any operating system where Java runs.

In this tool, Developers can also specify conditions for customized builds. Jenkins supports a massive plugin archive. This allows developers to alter how Jenkin looks and operates.

Moreover, the Jenkins Pipeline suite of plugins comes with special tools that allow developers to model easy-to-complex delivery pipelines using DSL ( Digital Subscribe line) method.

What does Travis do?

Travis CI offers following benefits:

  • You can monitor GitHub projects
  • Runs Test and generate results quickly. Parallel test execution is possible.
  • Build artifacts & check code quality
  • Easy Deployment to cloud services
  • It can identify small as well as large code changes.
  • Developers can use Travis CI to watch the tests when they are running.
  • The tool integrates with Slack, HipChat, Email, etc.

What does Jenkin do?

Jenkins allows you to automate your build, test, and deploy tasks. The tool provides support for different OS like Windows, Mac OSX, and Linux systems.

Moreover, Jenkins gives you an ability to quickly build and test your code to get early feedback on whether it’s ready for production or not. In most cases, Jenkin will require few modifications according to your team’s custom requirements.

Travis CI Features:

  • Automatic integration with GitHub
  • Repository access to build pull requests
  • Support for 21 languages like Android, C, C#, C++, Java, JavaScript (with Node.js), Perl, PHP, Python, R, Ruby, etc
  • Pre-installed build & test tools
  • Available services — databases, message queues, etc.
  • Deployment to multiple cloud services
  • Encrypt secure environment variables or files
  • Virtual machines recreated after every build
  • CLI client and API for scripting
  • Comes with free cloud-based hosting which does not require maintenance or administration.

Jenkin Features:

  • Easy to install, upgrade, and configure
  • Distributed Builds
  • Monitoring external jobs
  • More than 600 plugins to customize your Jenkins environment
  • Over 1000+ public repositories on Github, 500+ contributors, strong commit activity
  • Support for various authentication methods, version control systems, notification, etc.
  • Jenkins provides remote access API and its functionalities.
  • Provide Powerful CI/CD tool for big projects
  • It supports various job models like Freestyle, Pipeline, etc.,
  • Allows developers to add their extensions
  • Compatible with Docker, Libvirt, Kubernetes, and many other programs

Travis vs. Jenkins

Parameter Jenkin Travis
Cost Jenkins is free. But development team need to run and maintain their dedicated server. This could be considered an extra expense. Travis CI enterprise suites start at $129 per month. Cost increase based on the level of support you require.
Set up Time Jenkins needs elaborate setup. So you’ll have a very long wait time for the complete installation. It takes very less time to get started. Create a config file and start integrating.
Performance If you’re looking for a CI tool with unlimited customization options, then Jenkins is the best choice for you. Travis CI is the best choice If you are working in an open source project.
Tool Type It is an open-source free to use the tool. It is a commercial CI Tool
Usage Easy to use Flexible to use
Github Good for Github Excellent for Github
Support Extensive support from the community. Limited support for the community.
Pros
  • Customization is biggest benefit of the Jenkins CI server
  • An extensive plugin archive can be configured to change the look of Jenkins.
  • You can also add new functionality like authentication, alerts, and credentials.
  • Интеграция с GitHub и облаком
  • Неограниченные проекты с открытым исходным кодом с полной функциональностью
  • Обширная конфигурация проекта через файл .travis.ymi
  • Позволяет кластерные тесты и запускать их параллельно
  • Несколько сред сборки и целевые платформы (т. Е. Node 0.10,0.8,0.6, Li on).
Cons
  • Одним из основных недостатков непрерывной интеграции Jenkins является то, что она легко настраивается. Нет готовых настроек. Вот почему может потребоваться два-три часа в сутки, чтобы все настроить в системе.
  • Самым большим минусом установки Travis CI является то, что коммерческие планы начинаются с $ 129 / м, что довольно дорого.
  • Не подходит для проектов с высоким уровнем безопасности
  • В отличие от других инструментов CI, он не предлагает поддержку Bitbucket.
Планы использования Бесплатно Бесплатно для проектов с открытым исходным кодом. Тем не менее, Оплачивается для предприятия.
Серверная машина Сервер на базе Облако основе
Параметры настройки Больше Меньше
конфигурация Полностью настраиваемый YAML
Контроль в системе Полный Очень меньше

Индекс популярности

Ряд вопросов помечен Дженкинсом и Трэвисом в Stack Overflow.

Что лучше?

Таким образом, с помощью приведенного выше обсуждения мы можем убедиться, что и Трэвис, и Дженкинс оба предлагают замечательные возможности. Тем не менее, небольшие проекты с открытым исходным кодом лучше всего подходят для Travis CI, так как их легко запустить и быстро настроить. С другой стороны, крупное предприятие лучше всего подходит для Jenkins, поскольку оно предлагает бесплатное лицензирование для частного проекта и широкий спектр настраиваемых функций. Таким образом, мы можем сказать, что оба эти инструмента непрерывной интеграции хороши в своем отношении.

КЛЮЧЕВАЯ РАЗНИЦА

  • Travis CI — это коммерческий инструмент CI, а Jenkins — инструмент с открытым исходным кодом.
  • Трэвису CI требуется совсем немного времени, чтобы начать, в то время как Дженкинс нуждается в сложной настройке.
  • Travis CI предлагает меньше возможностей настройки, тогда как Jenkins предлагает широкие возможности настройки.
  • Travis CI имеет файл конфигурации YAML, тогда как Jenkins предоставляет пользователю полную конфигурацию.