Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
How we use Jenkins at mixi
Kazuyoshi Kato
February 22, 2012
Programming
2
15k
How we use Jenkins at mixi
Kazuyoshi Kato
February 22, 2012
Tweet
Share
More Decks by Kazuyoshi Kato
See All by Kazuyoshi Kato
Porting Docker to FreeBSD
kazuyoshi
10
12k
Planet Tempura
kazuyoshi
0
240
Other Decks in Programming
See All in Programming
Android Architecture Design With Koin
agiuliani
0
200
LOWYAの信頼性向上とNew Relic
kazumax55
4
300
型パラメータが使えるようになったのでLINQを実装してみた
makki_d
2
500
Named Document って何?
harunakano
0
180
Milestoner
bkuhlmann
1
200
Go言語仕様輪読会の開催を通じた振り返り
syumai
1
140
Jakarta EE 10 is Coming Your Way
ivargrimstad
0
1.7k
Is Rust a great language for building Kubernetes ecosystem
deepu105
0
140
How to get satisfaction from ungrateful work: A journey into updating Kotlin
syrinet
0
110
A technique to implement DSL in Ruby
okuramasafumi
0
440
質とスピード(2022春版、質疑応答用資料付き) / Quality and Speed 2022 Spring Edition
twada
PRO
27
17k
Where and how to run UI tests (Droidcon London, 2021)
nonews
0
200
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
12
890
Building an army of robots
kneath
299
40k
5 minutes of I Can Smell Your CMS
philhawksworth
196
18k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.4k
The Pragmatic Product Professional
lauravandoore
19
2.8k
Code Reviewing Like a Champion
maltzj
506
37k
What's new in Ruby 2.0
geeforr
336
30k
Mobile First: as difficult as doing things right
swwweet
212
7.5k
BBQ
matthewcrist
74
7.9k
Why Our Code Smells
bkeepers
PRO
324
54k
Scaling GitHub
holman
451
140k
The Web Native Designer (August 2011)
paulrobertlloyd
74
1.9k
Transcript
How we use Jenkins at mixi Kato Kazuyoshi mixi, Inc.
Kato Kazuyoshi 2012.8-p.info/ You can see my name on Firefox,
jQuery UI, Scala.
</officiallanguage>
We aim to eliminate SIMPLE, REPEATED, BORING jobs.
None
1. iOS Build and Create .plist
2. Android Build and Test Integrated with Gerrit
3. “mixi” Test
We are (still) a Perl shop.
Execute Shell
Test Results •TAP::Harness::JUnit •tap-to-junit-xml
% prove --harness TAP::Harness::JUnit ...
None
Code Metrics •Perl::Metrics::Lite
% measureperl-checkstyle \ ! --max_sub_lines 60 \ ! --max_sub_mccabe_complexity 10
\ ! --directory lib/Mixi \ ! > checkstyle-result.xml
Code Coverage •Devel::Cover::Report::Clover
XML is like a violence – if it doesn’t solve
your problems, you are not using enough of it.
None
Jenkins slave Jenkins master Ikachan Git repos IRC server
00:15-00:30
PROBLEM: SLOW TESTS
Small Medium Large Network access No localhost only Yes Database
No Yes Yes File system access No Yes Yes Use external systems No Discouraged Yes Multiple threads No Yes Yes Sleep statements No Yes Yes System properties No Yes Yes Time limit (seconds) 60 300 900+ googletesting.blogspot.com/2010/12/test-sizes.html
1. “recent” job
lib/Mixi/Foo.pm t/lib/Mixi/Foo.t t/lib/Mixi/Foo/bar.t t/lib/Mixi/Foo/baz.t
ci.example.com/job/trunk-recent/5446/api/json
ci.example.com/job/trunk-recent/5446/api/json $BUILD_URL
{ ... "changeSet" : { "kind" : null, "items" :
[ { "msg" : "...", "comment" : "...", "date" : "2012-02-21 10:07:29 +0000", "id" : "f9b10e71011cb33f90ef6092e72fab4947e3350f", "author" : { ... }, "paths" : [ { "file" : "static/js/mixi/notify/visitor-min.js", "editType" : "edit" }, { "file" : "static/js/mixi/notify/visitor.js", "editType" : "edit" } ] }, { "msg" : "...", "comment" : "...", "date" : "2012-02-21 10:11:06 +0000", "id" : "7289c319218d3f9e3d64b2a3a58333a3735ed2b5", "author" : { ... } "paths" : [ { "file" : "script/change_order_image.pl", "editType" : "edit" } ] } ]
None
2. “try” job
None
% make remote-test script/devel/remote-test View test results in a web
browser: http://ci.example.com/job/git-try/ %
None
None
ci.example.com/job/git-try/ ! buildWithParameters ? ! repos!! =!users%2Falice%2Fmixi & ! branch!
=!new-feature
WE— HTTP
3. The Free Lunch
None
Summary •You can use Jenkins with Perl. •Jenkins has many
“web” APIs.
Flickr is somewhat unique in that it uses a code
repository with no branches; code.flickr.com/blog/2009/12/02/flipping-out/
Feature Toggle martinfowler.com/bliki/FeatureToggle.html (2010)
building the right it before you invest a lot of
time and efforts to build it right. pretotyping.org/
Thanks!