Jenkins CI in Action

Embed Size (px)

Citation preview

Jenkins CI in Actionby Mikhail Pobolovets

Foreword

Senior Ruby developer/Team lead
at Altoros Systems

Ruby developer since 2007

Haskell and Erlang enthusiast

https://github.com/styx

What is CI?

Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Martin Fowler

Who is Jenkins?

Written in Java, but thats not a problem

Platform with minimum functionality

Plugins supportGerrit, Github, IRC, Jabber, Skype, Vagrant, Rake, LDAP

About 780 plugins

Distributed builds (Master Slave)

I want one!

So why you might want Jenkins?

Bad commit? You will know about in 5 minutes

Code delivery is easier and faster

Automation of annoying tasks

No need to invent a wheel, you already have a platform

The biggest community among other CI products

Bad commit? You will know about in 5 minutes

Code delivery is easier and faster

Don't lose your time waiting for tests before push

Automated deployment

No need to invent a wheel, you already have a platform

Highly extendable with plugins

OpenSource and free

The biggest community among other CI products

Alternatives

JetBrains TeamCitySexy interface but less flexible customizationRestrictions in free version100% Free for active/popular OpenSource projects

CruiseControl / .rbIs almost not supported by nowOpenSource and free

BambooIntegrates with JIRAFrom $50/mo for 1 agent

Travis CIFree for OpenSourceNo need to setup env

GitLab CIFree and OpenSourceIntegrates with Gitlab HQ

Gerrit

Gerrit is a web-based team software code review tool.

World of Warcraft hero. . / !

Workflows

With Gerrit trigger Main workflow for DevsNew patch set / Draft published

Special comment posted

Special phrase in commit message to skip build

By scheduleIntegration testing (nightly)

By dependency buildSpecial case if you have projects with shared code base

Gerrit workflow

Verified

Pull

Reviewed

Push

Pull

Submit

Tweaks

GC tweaks

Parallel Tests https://github.com/grosser/parallel_tests

Pspechttps://github.com/FUT/pspec

Skip part of the test suite if possible

Rubocop

Simple script to find out basic errors (debugger)

Brakeman