Continuous integration with jenkins

1,461 views
1,182 views

Published on

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,461
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
53
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Continuous integration with jenkins

  1. 1. Continuous Integration with Jenkins 中華電信研究院 黃培棠 beta@cht.com.tw 2013/03/14
  2. 2. 2
  3. 3. Just one click! 3
  4. 4. TOP 10 BEST GODZILLA FILMS by Calum Waddell, http://www.scifinow.co.uk/top-tens/29950/top-10-best-godzilla-films/ 4
  5. 5. Fail Early, Fail Fast, Fail Often. 5
  6. 6. Continuous Integration It is the practice of merging all developer workspaces with a shared mainline several times a day.http://en.wikipedia.org/wiki/Continuous_integration 6
  7. 7. Continuous What?• Build• Test – Unit tests, integration tests…• Analysis• Feedback• Publish• Deploy• ... most tedious things! 7
  8. 8. What To Be Integrated?• People• Code• Environment• Report• Thought• ... everything valuable! 8
  9. 9. OR NOTIFY?Why Developers <3 CI: A Guide to Loving Continuous Integration by Rebel Labs 9http://zeroturnaround.com/rebellabs/why-developers-love-ci/
  10. 10. Jez Humble, David Farley, Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation, 102010, Addison-Wesly
  11. 11. Jez Humble, David Farley, Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation, 112010, Addison-Wesly
  12. 12. Ticket for CI• SCM system• Build scripts/tools• Automated test cases• Artifact repository• Fast, highly available machines• Open-minded members 12
  13. 13. Power Tools CI Servers Build Automation Tools Artifact Repositories Test Frameworks Code AnalysisWhy Developers <3 CI: A Guide to Loving Continuous Integration by Rebel Labs 13http://zeroturnaround.com/rebellabs/why-developers-love-ci/
  14. 14. Paul M. Duvall et al, Continuous Integration: Improving Software Quality and Reducing Risk, 2007, Addison-Wesley 14
  15. 15. Introducing to Butler with Bowtie:Jenkins 15
  16. 16. Personal Information• Child of Kohsuke Kawaguchi (川口耕介)• Renamed from Hudson – Had cosmetic surgery at the same time portrait before the surgery 16
  17. 17. Skills• 耐操、有擋頭 – 不遲到、不早退 – 不會亂吠• 專心 – 不會上 facebook, YouTube• 記性好 – 不會忘了改什麼設定,或忘了按 commit 就下班• 便宜 17
  18. 18. Running Jenkins • Download – http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war • Run java -jar jenkins.war [--httpPort=8080] • Play around – http://localhost:8080/https://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins 18
  19. 19. 19
  20. 20. Built-in Plugins 20
  21. 21. Work Behind Proxy Is it really a part of Update Center? 21
  22. 22. Thanks Maven POM 22
  23. 23. Just Tell Him What to Build 23
  24. 24. 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.http://www.martinfowler.com/articles/continuousIntegration.html & Paul M. Duvall et al, Continuous Integration 24
  25. 25. Action! 25
  26. 26. Jenkins++ 26
  27. 27. s/green/blue/g • Its not for color blind users. • Its all about (influenced by ): • Green Balls Plugin 青 Cyan #00FFFF – https://wiki.jenkins-ci.org/display/JENKINS/Green+Ballshttp://jenkins-ci.org/content/why-does-jenkins-have-blue-balls 27
  28. 28. • Gravatar - Globally Recognized Avatar• Register your own avatar – at https://en.gravatar.com/• Easy identification easy 28
  29. 29. Static Code Analyses• Checkstyle• DRY• FindBugs• PMD• Compiler Warnings• Task Scanner – TODO, FIXME, XXX... 29
  30. 30. Disk Usage• Keep watching! 30
  31. 31. CI Game• Go top! 31
  32. 32. Build Pipeline 32
  33. 33. Extreme FeedbackContinuous Integration using Jenkins by Chris Shenton, http://koansys.com/tech/jenkins/jenkins-ci-pdf/view 33

×