Continuous Integration
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Continuous Integration

  • 2,472 views
Uploaded on

Experience report on CI, Hudson and branch management.

Experience report on CI, Hudson and branch management.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,472
On Slideshare
2,470
From Embeds
2
Number of Embeds
2

Actions

Shares
Downloads
46
Comments
0
Likes
0

Embeds 2

http://www.slideshare.net 1
http://www.linkedin.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • -> Important to maintain reproducability
  • Interface also over jmx. Simple to version control config in subversion Difficult to spot errors. Requires all builds to be sane before start. Complex build jobs: pipeline builds
  • several instances. each branch needs one instance if they do changes across the project
  • More difficult to keep config in SVN, and to create a new instance. Easier to create new jobs.
  • Mental break
  • Using maven and hudson to update various environments for testing.
  • PMD – Programming Mistake Detector CPD – Copy Paste Detection NCSS - Non Commenting Source Statements
  • ” Trust parent to detect if he breaks his child” Instant breakage, but a lot of effort during work. Trouble if a lot of artifacts has to be branched.
  • Do not trust parent to break me. ” Do not trust anyone, escpecially not parent” More stable, but postpones trouble.

Transcript

  • 1. Continuous Integration - an experience report - Harald Søvik Computas AS © Computas AS
  • 2. Outline
    • The Mats Project
    • Branch- and release management
    • Build servers
    • Experience with Hudson
    • Thoughts and ideas
    © Computas AS
  • 3. The Mats Project
    • Norwegian Food Safety Authority
    • 20-30 developers
    • 4 years of development
    • 6 years of maintenance (15 devs)
    • ~50 integration points
    • Swing and web
    © Computas AS
  • 4. The Mats Project © Computas AS
  • 5. The Mats Project © Computas AS
  • 6. The Mats Project
    • Core technologies
      • Java 1.6
      • Java EE5
      • JBoss 4.2
      • Oracle RAC 10g
      • webMethods 6.5
    © Computas AS
  • 7. The Mats Project
    • Dev tools
      • IntelliJ IDEA 8.1
      • Subversion 1.6
      • Maven 2.0
    • Testing tools
      • VMware
      • Windows TS / Citrix
      • Linux
    © Computas AS
  • 8. The Mats Project
    • One development branch
      • scrum
      • 3 teams á 5 devs
      • sprints á 4-5 weeks
      • 10-15 sprints in each release
    • One maintenance branch
      • 1 team á ~7 devs
      • scrumban, kanban, ...
      • release each 3 weeks
    © Computas AS
  • 9. Branch- and release management © Computas AS
  • 10. Branch- and release management
    • Each branch:
      • Build server
      • Reference environment
      • Test environment
      • Verification environment
      • Unit- and integration tests
      • Doc and maven site
      • Tools, build plugins
      • DB scripts
      • Appserver configuration
    © Computas AS
  • 11. Cruise Control © Computas AS
  • 12. Cruise Control
    • Simple interface
    • Monolithic configuration file
    • No connection build/job
    • Some plugins
    • Difficult to express complex build jobs
    • Difficult to access build artifacts
    • .. unable to abort builds !
    © Computas AS
  • 13. CI tools
    • CruiseControl
      • the original
    • Continuum
      • the maven way
    • Luntbuild
      • the challenger
    • Hudson
      • the new kid in town
    • http://groups.google.com/group/EtoE/browse_thread/thread/b6675c74c03a621b
    © Computas AS
  • 14. Hudson © Computas AS
  • 15. © Computas AS
  • 16. Hudson
    • GUI
    • Lots of files in ~/.hudson
    • Lots of plugins
    • Watch build output
    • Access workspace
    • RSS, email, IM
    • Slave builds
    • More stable !
    © Computas AS
  • 17.  
  • 18. Hudson jobs
    • Deploy at once
      • deploy to mavenrep
      • pros and cons
    • “ Pipeline build”
      • one job per module
      • primary tests
      • build dependents
    © Computas AS
  • 19. Hudson slaves
    • “ Keep the Build Fast”
    • SSH slaves
      • pki, mvn, svn
    • UI testing
      • watir
      • selenium
    © Computas AS
  • 20. Hudson: deploy !
    • Environments
      • Deploy immediately
      • Deploy nightly
      • Deploy weekly
      • “ Value chain”-tests
    • Automation
      • Single click build
      • Database scripts
    © Computas AS
  • 21. Hudson metrics
    • mvn site
      • PMD
      • CPD
      • NCSS
      • surefire
      • findbugs
      • changelog
    © Computas AS
  • 22. Hudson and branches
    • Problem:
      • A > B > C
      • B is being branched
        • B’
      • Can B’ break C without knowing ?
    © Computas AS
  • 23. Hudson and branches
    • Solution 1: Yes, of course:
      • B’ should be a job
      • C’ should be a job !
      • Breakage should be instant !
    © Computas AS A B C B’ C’
  • 24. Hudson and branches
    • Solution 2: That is not a problem
      • All dependencies should be static
      • Entire tree is private
      • No breakage until merge
    © Computas AS A B C B’ C’ A’
  • 25. Continuous deployment
    • Deploy into production
      • Unit tests
      • Integration tests
      • Performance tests
      • UI tests
      • Then: immediately!
    © Computas AS
  • 26. Continuous deployment
    • No interruption to the end user
    • Upgrade ”live” objects
    • Upgrade ”live” configuration
    • Redeploy quicker than change frequency
    • Change must be immutable
    • Trustworthy tests
    • Promote changesets !
    © Computas AS
  • 27. Thanks !
    • twitter.com/harals
    • [email_address]
    © Computas AS