Continuous integration with jenkins

Post on 06-May-2015

918 views 3 download

Transcript of Continuous integration with jenkins

Continuous Integration

with Jenkins

中華電信研究院 黃培棠

beta@cht.com.tw

2013/03/14

2

3

Just one click!

5

Fail Early,

Fail Fast,

Fail Often.

Continuous Integration

It is the practice of merging

all developer workspaces

with a shared mainline

several times a day.

6 http://en.wikipedia.org/wiki/Continuous_integration

Continuous What?

• Build

• Test – Unit tests, integration tests…

• Analysis

• Feedback

• Publish

• Deploy

• ... most tedious things!

7

What To Be Integrated?

• People

• Code

• Environment

• Report

• Thought

• ... everything valuable!

8

10 Jez Humble, David Farley, Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation,

2010, Addison-Wesly

11 Jez Humble, David Farley, Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation,

2010, Addison-Wesly

Ticket for CI

• SCM system

• Build scripts/tools

• Automated test cases

• Artifact repository

• Fast, highly available machines

• Open-minded members

12

14 Paul M. Duvall et al, Continuous Integration: Improving Software Quality and Reducing Risk, 2007, Addison-Wesley

Jenkins

Introducing to Butler with Bowtie:

15

Personal Information

• Child of Kohsuke Kawaguchi (川口耕介)

• Renamed from Hudson

– Had cosmetic surgery at the same time

16 portrait before the surgery

Skills

• 耐操、有擋頭

– 不遲到、不早退

– 不會亂吠

• 專心

– 不會上 facebook, YouTube

• 記性好

– 不會忘了改什麼設定,或忘了按 commit 就下班

• 便宜

17

19

Built-in Plugins

20

Work Behind Proxy

21 Is it really a part of Update Center?

Thanks Maven POM

22

Just Tell Him What to Build

23

CI Practices

• Everyone commits at least once a day.

• Keep the build fast.

– An unit test is just an UNIT test.

– Replace dependencies with mocks.

• 100% of tests must pass for every build.

• Fixing broken builds is of the highest priority.

• Someone review reports generated by the build.

24 http://www.martinfowler.com/articles/continuousIntegration.html & Paul M. Duvall et al, Continuous Integration

25

Action!

Jenkins++

26

• Gravatar - Globally Recognized Avatar

• Register your own avatar

– at https://en.gravatar.com/

• Easy identification easy

28

Static Code Analyses

29

• Checkstyle

• DRY

• FindBugs

• PMD

• Compiler Warnings

• Task Scanner

– TODO, FIXME, XXX...

Disk Usage

• Keep watching!

30

CI Game

31

• Go top!

Build Pipeline

32