ORACLe
Oracle
Press
Hudson Continuous
Integration
in
Practice
Ed
Burns
and
Winston
Prakash
Mc Graw Hill
Education
New
York
Chicago
San Francisco•
Athens London
Madrid
MexicoCity
Introduction
PARTI
Essential
Knowledge
1
Getting
Started 3Installing
Hudson 4Trying
Hudson
with theEasy
Installation
Method 5Installing
Hudson as aWindows Service 8Installing
Hudson to Start When a UserLogs
in to Mac OS X 10Installing
Hudson
Within Tomcat 12Installing
Hudson onGNU/Linux 15Basic Hudson
Configuration
18 Your FirstJob:
BackEverything
Up
23Summary
242 Hudson Precondition Primer 25
Hudson
inthe SoftwareDevelopment
Lifecycle
26Developer
27Tester 28
Manager
29Architect
29Release
Engineer
29Example:
Orchestration of RolesAround
Hudson 29 SoftwareDevelopment
asMarionette Theatre Production 30Development
Platforms 31Software
Configuration
Management
32Builders 32
vi
Hudson ContinuousIntegration
in PracticeIntegrated Development
Environments 39Eclipse
39Oracle
jDeveloper
43IntelliJ
IDEA 46NetBeans 48
Testing
Tools 50Soft
CorrectnessTesting
Tools 53Summary
543 Basic
Concepts
55Intermediate
HudsonConfiguration
56Adding
SourceCodeManagement (SCM)
to YourJobs
56 YourSecond Job:
ASimple
JavaProgram
59 YourThirdJob:
ASimple
Servlet 65Using
thePlugin
Center 69Your Fourth
Job:
AdvancedBackup Options
75 Hudson AuthenticationSecurity
77Adding Quality
AssuranceSystems
80Build
Notifiers
89Configuring
E-mail Server 89Configuring
theJob
toSendBuild
StatusMessage
90Summary
91PART II
Applying
Hudson
4 Hudsonas aContinuous
Integration
Server 95What Is Continuous
Integration?
96Setting
Up
the CI Environment 97Sherwood
County
Library
98Sherwood
Library
SoftwareComponents
99 Source CodeManagement
103Build Automation 107
Maven as anAutomated Build Tool 107
Speeding Up
the Build 108Managing
theUpstream-Downstream
Jobs
Complexity
115Continuous
Testing
118Types
of
Tests 118Viewing
the Unit Test Results 119Test Result Trends 120
Continuous Feedback 123
Extended E-mail Notification 124 Continuous
Delivery
orDeployment
127Deploying
aJava
Application
to anApplications
Server 128Uploading
Build Artifacts toAnother Machine 129Executing
Commandson a RemoteMachine
131Summary
1335
Hudson
and AutomatedTesting
135Containing
Code and CodeUnder
Test 136A
Quick
Tourof the
Maven BuildLifecycle
138Quick
CodeJumpstart: Simple
ServletTesting
143Automated
Testing:
Shields
Up!
153The
Software
Lineup
154 Who Writes theTests? 156 Kinds ofTests 157Unitand
Component
Testing
withArquillian
in Hudson 159 Hudson AutomatedTesting
Tips
164Summary
1666
Hudson
as Partof
Your Tool Suite 167IDE
Integration
168Creating
a New HudsonJob
Directly
from a NetBeansProject
171Eclipse
HudsonIntegration
172IntelliJ
IDEA HudsonIntegration
174JDeveloper
HudsonIntegration
175Hudson Issue Tracker
Integration
178Atlassian JIRA
Integration
178Bugzilla
Integration
178OtherIssueTrackers 179
Browserand
Desktop
Integration
179Browser
Integration
179Desktop Integration
181Mobile
Integration
184Publishing
Build
Artifacts from Hudson 185Artifact
Repository
186Deploy
to Container 189FTP Publisher
Plugin
..." 190Vlii
Hudson ContinuousIntegration
in Practice7 Distributed
Building
Using
Hudson 193Master-Slave
Mode ^4 Hudson Slaves 195Types
of Slaves ^7Adding
aSlave Node
toHudson
198Adding
anUnmanaged
Slave viaJNLP
Launcher 202Adding
an SSH-BasedManaged
Slave 206Distributing
the Builds
211Managing
Slaves 217Summary
2198 Basic
Plugin Development
221Writing
a HelloWorldPlugin
222Creating
thePlugin
Project
222Creating
a Service Hook 223Building
thePlugin
224Testing
thePlugin
225HPITool 227
Creating
a SkeletonPlugin
Project
228Building
andRunning
the
Plugin Project
229Testing
the SkeletonPlugin
230Understanding
theHudson
Plugin
Framework
231What Is an Extension
Point?
231Extending
an Extension Point 232Examining
theSample
Extension
233
Modifying
the
Sample
Extension 235Extension Ul
Configuration
238
Configuration
FileConventions
239
Configuration
UlRendering
241Interaction Between Ul and Model 242
Ul
Validation
244Global
UlConfiguration
246Summary
248 PART IIIThe Hudson
Lifestyle
9
Advanced
Plugin Development
251
Extending
VariousAspects
ofHudson Dashboards
252
Creating
a Custom RenderedJobs
Status View252
Using
the
Custom Rendered View259
Adding
aCustom
Column to the Default ViewAdding
anAction to the Action Panel of the Main Dashboard 262Custom Decoration of Hudson
Pages
267Extending
VariousAspects
of
aHudson Job
270Adding
a Custom Notifierto aJob
271Adding
a CustomLinkto aJob
Dashboard
275Creating
a Custom BuildWrapper
283Summary
28710
Hudson
Best Practices 289Manage
the Hudson ResourcesEffectively
290Tune
Memory
290Restrict
Job History
Depth
292Monitor the Disk
Space
296Put YourHudson Behind aWeb
Proxy
298Do Not Use Your
Hudson
as aFile
Server 300Periodically
BackUp
Your Hudson Contents 301 SetUp
a Fail-Safe Mode forYourHudson
306Redundant
Hudson ServerSetup
307Monitoring
HudsonSetup
308ServerSwitchon Failure 309
Redirecting
HTTP Trafficto a Redundant Server 310Scale
Up
theSecurity
ofYourHudson 311Restrict
Job
Access to CertainUsers 311Add Roles tothe Authorization Matrix 313
Upgrade
Your HudsonDiligently
315Understand the Hudson
Versioning
Scheme 316Upgrade
in a Sandbox First 317Summary
318PART IV
Appendixes
A
Widely
Used HudsonPlugins
321B Personal Hudson Instance 333
Hudson-as-Valet 334
Optimal
Hudson-as-Valet
Setup
335Hudson for Work Area Maintenance 336
The
Open-Source
Liaison Role 336The
CommitterRole
340 Hudson asGeneral-Purpose
Scheduler 342Hudson Plot
Plugin
342X Hudson Continuous
Integration
in PracticeC Hudsonfor Windows
Developers
345Key
Enablers forUsing
HudsononNon-Java
Platforms 346Build
Step
347 Collect ResultsStep
347Hudson and the Windows Software Platform 349 Hudson and Automated