hudson (jjug cccにて)

Download Hudson (JJUG CCCにて)

If you can't read please download the document

Upload: kohsuke-kawaguchi

Post on 16-Apr-2017

14.236 views

Category:

Documents


0 download

TRANSCRIPT

PRESENTATION TITLE UP TO A MAXIMUM OF THREE LINES FONT IS SUN SANS SEMIBOLD, 30PT

Senior Staff EngineerSun Microsystems, Inc.

Sun Microsystems

JAXB, JAXP, JAX-WS, Metro, GlassFish


com4j, args4j, parallel-junit, sorcerer, nlink, txw, xsom,

Hudson

486 100MHz + 8MB RAM
= 25

1995

2008Quad core 2.4GHz + 4GB RAM
= 10


$53,700


$81,850

: http://www.tms.org/pubs/journals/JOM/9505/Beazley-9505.html19942006Kids right out of the college already gets $57620

Or shall I say Maharaja?

=$80,000/yr

=$160,000/yr

$500/day

$60/hr

Amazon EC2: $0.10/hr

1

(CI)

15

Hudson

JavaCI

Hudson

Java.net

80

85x12

4250

93

FOSS


Hudson

10

coreplugin

()

4-6 RFEs/

1.255

CVS, Subversion, ClearCase, Mercurial, Accurev, Perforce, StarTeam,

Ant, Maven, shell script, NAnt,

RSS feeds

E-mail/IM

findbugs, emma, cobertura, VMWare,

Adjust more Hudson features slide after the demo is scripted

Hudson

530

JAXB RI #100

A

JAXB RI #101

B

JAXB RI #102

B

JAXB #35

JAXB #36

Two more use-cases

I made a large change. I want to check that the corresponding SQA test result is goodWe are close to a release. We need tags from all the dependencies. Which versions are we using today?

Hudson

Ant/Maven/etc

Findbugs

full Metro build #10full Metro build #11

JAXB #10JAXB #11JAXB #12JAX-WS #20JAX-WS #21JAX-WS #22

JAX-WS #10Unit test with GF

Unit test with TomcatSQE testJAX-WS #11JAX-WS #12

Test w/o container3OS x 2JDK = 6 tests

Ant

$ wget O foo.zip \ http://server/hudson/job/foo/lastSuccessfulBuild/
artifact/foo.zip

QA

Maven

Imagine a fully automated network of promotion.

HTTP

83K


Because if you can only put one computer at work, theres only so much it can do

network.comEC2


VMWareVirtualBox


Selenium, Hadoop, JMeter,

Hudson

1


HudsonSelenium

HudsonSelenium

HudsonSelenium


Hudson

Hudson will be a lot more useful if it connects to other systems that you useBecause we waste so much time searching for context information

Remoting API

RESTful API
XML/JSON/Python

glassfish-v3 http://kohsuke.sfbay/hudson/job/glassfish-v3/ blue

Eclipse

NetBeans

Maven

Hudson!

http://hudson.dev.java.net/

Nothing to see beyond here. Move on!

Why do I care?

Life before Hudson

Dev makes a change Monday AM

Nightly QA run finds a bug Monday night

Dev fixes it Tuesday

Lot of wasted time

Life after Hudson

Dev makes a change Monday AM

Hudson finds a regression 30 mins later

Dev can fix it before lunch

Four slides from here are reasonable slides, but just needed to trim the whole thing down.

Why do I care?

Life before Hudson

QA test runs every night, results sent out in e-mail

After the enthusiasm of the 1st week is gone, nobody looks at them anymore

Regressions go unnoticed until its too late

Life after Hudson

Tests run Hudson after every commit

E-mail sent out only when tests start failing

So it manages to keep peoples attention

Why do I care?

Life before Hudson

A blocker bug is discovered in a library created by another team

Fix is obvious but you dont know which branch to commit a change

and you dont know how to run full tests either

Your only option is to write to Ashok and ask him to fix it

Too bad if hes on a family vacation to Disneyland

Life after Hudson

Hudson knows where the code is, how to build & run tests for it

Competent devs can help, even w/o project-specific knowledge

Got the idea?

Automation

Reduce turn-around time

Make things transparent

Remove people from the loop

Save peoples time

Push jobs to servers, keep workstations idle for you

Beyond Java

People are using Hudson for non-Java projects

Ruby support

Parse unit test results with CI::Reporter

Invoke ruby script as the build

Python support

Parse test results

Pylint report integration

.NET support

NAnt, NUnit, FXCop, MSBuild, and Visual Source Safe integrations

You can always invoke anything through shell script

Perhaps condense this into one line and add somewhere?

Dependency Tracking

Dependency tracking

SQA finds a test failure. Dev thinks he just fixed it. Did that fix went into that test run or not?

I made a large change. I want to check that the corresponding SQA test result is good

We are close to a release. We need tags from all the dependencies. Which versions are we using today?

Hudson can tell you

JAXB unit test #35 tested JAXB RI #192

JAX-WS #52 uses JAXB #185 and FI #52

Needs re-work. Too crowded. Hard to get the point across.

FindBugs integration

Tracking changes

and more

Browse workspaces

Build time trend report

Simplify Installation

People are lazy (at least I am)

Many wont even try if its hard to install

Running Hudson is easy!

$ java -jar hudson.war

Simplify Configuration

People make silly mistakes (at least I do)

Think about your junior engineers

So Hudson does

Let all configurations from web UI

Try to minimize # of configs

Inline help

Extensive on-the-fly form field validation

Dont just point out problems, suggest fixes

Proactively detect common problems

Clock out-of-sync, low disk space

Extensibility points

Its all for the extensibility

Stapler enables seamless UI integration

Deployment-free distributed computing

Most model objects are pluggable

SCM, job type, builder,
publisher, trigger,

These are where plugins can contribute

Built-in features use the same extensibility mechanism

and more

OpenSearch

Build Promotion

Plugin Development Environment

No, actually this was my first time using maven, I just followed the directions on your webpage and I was off and running.

Peter Franza I had a similar experience: with no prior maven experience, I had my first plugin up & running so fast, I couldn't quite believe I had gotten it to work. :)

Adam Ambrose Feels like a cheap advertizement

Distributed Builds

Go distributed once you see >2 concurrent builds

Builds and tests are highly CPU/memory/disk intensive

Use ssh+public key on Unix to let Hudson manage slaves

Automatic slave launch when Hudson restarts

Auto-reconnect for dropped connections

Use cygwin ssh on Windows

Cygwin helps keep the platforms look uniform

Its possible to run this in different ways

Like using Web Start

Distributed Builds

Better to keep slaves look alike

Dont let builds depend on particular slaves

Slaves come and go

Use labels to classify

Improving our story around VMs as slaves

Prepare N environments, and run as many clones as the build needs

Improving our story around cloud computing as slaves

Dont even own computers anymore

Simplify Installation

People are lazy (at least I am)

Many wont even try if its hard to install

Running Hudson is easy!

Wait, it gets even easier

Start by just a mouse click

$ java -jar hudson.war

Guess theyll be covered in demo

A

B

C

Wall Street, Amazon, Google, , Linked-In,

Application Lifecycle Management

JJUG CCC 2008 fall