Your SlideShare is downloading. ×
0
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Jenkins
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Jenkins

4,147

Published on

continue integration with jenkins

continue integration with jenkins

Published in: Technology
1 Comment
6 Likes
Statistics
Notes
  • This Presentation is very Useful for one who use Jenkins.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
4,147
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
261
Comments
1
Likes
6
Embeds 0
No embeds

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

Transcript

  • 1. Continuous Integration with Jenkins CIJan Riemann und Niklas Lochschmidt
  • 2. Late Integration is… not goodCan Lead to “Big Bang Integration” External ProjectMaster Integration Deliverable08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 2
  • 3. Continuous Integration External ProjectMaster§  A software development practice§  Integrate your work in the project as often as possible §  At least once a day Deliverable §  Integration goes alongside the development à continuous§  Integration is no longer a dreadful (often postponed) event Integration§  Only possible through automated builds, tests and deployment §  Leads to better quality and early deliverables08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 3
  • 4. CI Best Practices §  Maintain a single source repository §  One team has one repository holding the mainline (trunk) §  Checkout must include everything needed for the build §  Automate the build §  Use a script or a build tool (e.g. Maven) §  Manage dependencies §  Make the build fast §  Show all warnings and errors §  Fail early08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 4
  • 5. CI Best Practices§  Make your build self-testing §  Run tests as part of the build process §  Provide rapid feedback Integration §  define a test pipeline with distinct test phases Tests §  Test in the production clone Unit Tests Static Code Analysis§  Automate deployment §  Always publish the latest tested build §  Everyone has the same state §  Could go directly in production (not recommended)à Automate the entire setup using08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 5
  • 6. What is Jenkins CI?§  Jenkins is a central build server §  Written in Java §  Runs as Servlet in Tomcat or standalone (e.g. Windows Service)§  Performs „jobs“ §  Configurable §  Does all the tedious work (checkout, build, test, package, deploy)§  Adapts to your workflow §  More than 350 plugins available§  Jenkins forked from Hudson (Oracle) in January 2011 §  Most Hudson developers switched to Jenkins §  Oracle donated Hudson to the Eclipse Foundation in May 201108. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 6
  • 7. Repository Contains Everything Needed toBuild the Project§  CI: Repository contains: §  Code, Resources §  NO build products§  Jenkins supports many common SCM systems like SVN, CVS §  Automatic checkout/update on build §  Build on updates in the SCM08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 7
  • 8. Building the Project Relies on External BuildTools§  Jenkins relies on external build tools §  Many common tools supported - like Ant, Maven, Ivy (plugins), … §  Allows to reuse the build scripts used locally§  Jenkins builds the project… §  after another project has been builded §  according to a given schedule §  after code changes in the SCM §  many other (=> Plugins)08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 8
  • 9. Jenkins Allows to Perform Post-Build Actions§  If build fails, Jenkins considers job as failed§  Jenkins allows to perform a number of post-build actions:08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 9
  • 10. Common Test-Frameworks are Supported byJenkins§  Jenkins can use all test frameworks supported by the build tool§  Has plugins to read and visualize the test results of various frameworks §  Junit, Checkstyle, Findbugs, Selenium, coverage tools,...08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 10
  • 11. Multiple Test-Sets can be Executed using Jobs§  Multiphase testing §  Small tests can be executed after each SCM commit giving fast feedback §  Time consuming tests can be executed on a nightly basis (e.g. Selenium FF) §  One job for each set of tests§  CI: Tests should also happen in a production system clone§  Tests fail: Jenkins considers project as unstable §  Otherwise: successfull§  Keeps history of build status08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 11
  • 12. Jenkins Supports Automatic Deployment§  Jenkins offers (again) a lot of possibilities to deploy generated artifacts §  Upload to scm, ftp, folder, …§  Ideally, the output of a build cycle is a fully running artifact§  Can serve as a common basis for all developers08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 12
  • 13. Sources§  Continuous Integration §  http://martinfowler.com/articles/continuousIntegration.html §  http://www.se-radio.net/?s=133§  Jenkins §  Homepage http://www.jenkins-ci.org §  Wiki http://wiki.jenkins-ci.org §  Plugin-List https://wiki.jenkins-ci.org/display/JENKINS/Plugins §  Github https://github.com/jenkinsci/jenkins §  Jenkins CI Server http://ci.jenkins-ci.org/ §  Fork from Hudson http://jenkins-ci.org/content/hudsons-future08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 13
  • 14. Get Notified about Failed Builds and FailedTests §  Via Email (Default) or... ...http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/Devices/BubbleBubbleBuildsInTrouble.rdoc08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 14
  • 15. Integration in Eclipse§  „Mylyn Builds Connector: Hudson/Jenkins“ in the Mylyn repository §  Update-Site: http://download.eclipse.org/mylyn/releases/latest08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 15
  • 16. Jenkins Supports Multi-Environment Builds§  Multi-environment builds §  Easy to automatically build (and test) the project on many platforms using slaves§  Multiplatform testing §  Jenkins slaves can execute the testsuite on different platforms08. Juni 2011 | Component Technology for Distributed Applications | Niklas Lochschmidt, Jan Riemann 16

×