Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Continuous Integration with Jenkins

Continuous Integration with Jenkins

An introduction on Continuous Integration and Jenkins.

Avatar for Pei-Tang Huang

Pei-Tang Huang

March 14, 2013
Tweet

Other Decks in Programming

Transcript

  1. 2

  2. 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
  3. Continuous What? • Build • Test – Unit tests, integration

    tests… • Analysis • Feedback • Publish • Deploy • ... most tedious things! 7
  4. What To Be Integrated? • People • Code • Environment

    • Report • Thought • ... everything valuable! 8
  5. 9 Why Developers <3 CI: A Guide to Loving Continuous

    Integration by Rebel Labs http://zeroturnaround.com/rebellabs/why-developers-love-ci/ OR NOTIFY?
  6. 10 Jez Humble, David Farley, Continuous Delivery: Reliable Software Releases

    through Build, Test, and Deployment Automation, 2010, Addison-Wesly
  7. 11 Jez Humble, David Farley, Continuous Delivery: Reliable Software Releases

    through Build, Test, and Deployment Automation, 2010, Addison-Wesly
  8. Ticket for CI • SCM system • Build scripts/tools •

    Automated test cases • Artifact repository • Fast, highly available machines • Open-minded members 12
  9. Power Tools 13 Why Developers <3 CI: A Guide to

    Loving Continuous Integration by Rebel Labs http://zeroturnaround.com/rebellabs/why-developers-love-ci/ CI Servers Build Automation Tools Artifact Repositories Test Frameworks Code Analysis
  10. 14 Paul M. Duvall et al, Continuous Integration: Improving Software

    Quality and Reducing Risk, 2007, Addison-Wesley
  11. Personal Information • Child of Kohsuke Kawaguchi (川口耕介) • Renamed

    from Hudson – Had cosmetic surgery at the same time 16 portrait before the surgery
  12. Skills • 耐操、有擋頭 – 不遲到、不早退 – 不會亂吠 • 專心 –

    不會上 facebook, YouTube • 記性好 – 不會忘了改什麼設定,或忘了按 commit 就下班 • 便宜 17
  13. Running Jenkins • Download – http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war • Run • Play

    around – http://localhost:8080/ 18 java -jar jenkins.war [--httpPort=8080] https://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins
  14. 19

  15. 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
  16. s/green/blue/g • It's not for color blind users. • It's

    all about (influenced by ): • Green Balls Plugin – https://wiki.jenkins-ci.org/display/JENKINS/Green+Balls 27 青 Cyan #00FFFF http://jenkins-ci.org/content/why-does-jenkins-have-blue-balls
  17. • Gravatar - Globally Recognized Avatar • Register your own

    avatar – at https://en.gravatar.com/ • Easy identification easy 28
  18. Static Code Analyses 29 • Checkstyle • DRY • FindBugs

    • PMD • Compiler Warnings • Task Scanner – TODO, FIXME, XXX...
  19. Extreme Feedback 33 Continuous Integration using Jenkins by Chris Shenton,

    http://koansys.com/tech/jenkins/jenkins-ci-pdf/view