1 / 23

Continuous Integration Systems

Continuous Integration Systems. Shava Smallen Jim Hayes. Continuous Integration.

Mercy
Télécharger la présentation

Continuous Integration Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Continuous Integration Systems Shava Smallen Jim Hayes

  2. Continuous Integration • “Continuous Integrationis a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.” -- Martin Fowler

  3. Choosing a CI System A useful CI system should support • Retrieving source from varied revision control systems • Building software and running tests on systems with varied architecture/os/software configuration • Transmitting build/run results to display machine • Configurable summaries of results • (Bonus) tracking changes to software • (Bonus) easy, flexible configuration

  4. Outline • Four CI Systems • Condor Build & Test • CruiseControl • Tinderbox • DART • Example: CruiseControl • Summary

  5. Condor Build & Test • Pluses • Flexible definition of automated checkout/build/test steps • Easy access to varied build hosts • Built-in transmission of results • Minuses • No planning for reuse of CI system during development • Welded to Condor • Fixed display • No documentation

  6. CruiseControl • Pluses • Automated checkout/build/test • Built-in transmission of results • Good support for tracking software changes • Configurable display • Minuses • Strongly tied to Java/Junit/Ant • Single build host

  7. Tinderbox • Pluses • Supports multiple, varied build hosts • Highly configurable display • Good support for tracking software changes • Minuses • No automation of checkout/build/test • Conventional configuration requires friendly sysadmin • Result transmission via mail?!?

  8. DART • Pluses • Supports multiple, varied build hosts • Easy transmission of results • Flexible result summaries • Integration with CruiseControl • Minuses • No automation of checkout/build/test • C/C++ bias • Poor documentation

  9. Outline • Four CI Systems • Condor Build & Test • CruiseControl • Tinderbox • DART • Example: CruiseControl • Summary

  10. CruiseControl • Features (partial): • Lots of support for Java projects • Very easy to install & setup • Build & test can be triggered by SVN/CVS check-in or on-demand (web page trigger) • Email notifications can be setup on error • Configurable

  11. Installing CruiseControl • Download cruisecontrol-bin-2.5.zip from http://cruisecontrol.sourceforge.net • % nohup ./cruisecontrol.sh -webport 9011 >& cruisecontrol.out & README.txt connectfour.ser docs webapps apache-ant-1.6.5 cruisecontrol.bat lib artifacts cruisecontrol.log logs config.xml cruisecontrol.sh projects

  12. CellTest.java package net.sourceforge.cruisecontrol.sampleproject.connectfour; import junit.framework.TestCase; public class CellTest extends TestCase { public void testConstructor() { Cell newCell = new Cell(10, 5); assertEquals(10, newCell.getColumn()); assertEquals(5, newCell.getRow()); } }

  13. Configuring CruiseControl • Projects contained in config.xml • Each project can have • Listener - log file written to logs/<project>/status.txt • ModificationSet - e.g., SVN/CVS diff • Bootstrapper - e.g., SVN/CVS update • Schedule - how often to check for changes, ant call • Publisher - on success/failure - log, email, etc. • Build.xml needs to contain junit task using XML formatter

  14. Config.xml … <project name="branches-inca-common-java"> <listeners> <currentbuildstatuslistener file="logs/${project.name}/status.txt"/> </listeners> <bootstrappers> <svnbootstrapper localWorkingCopy="projects/${project.name}" /> </bootstrappers> <modificationset quietperiod="30"> <svn localWorkingCopy="projects/${project.name}"/> </modificationset> <schedule interval="300"> <ant anthome="apache-ant-1.6.5" buildfile="config/${project.name}.xml" target="test"/> </schedule> <log dir="logs/${project.name}"> <merge dir="projects/${project.name}/inca-common-java/test-results"/> </log> </project>

  15. Build.xml … <target name="run-tests" description="run the unit tests included in this package"> <mkdir dir="${tests.output}"/> <junit printsummary="yes" fork="yes" timeout="180000" showoutput="no" > <classpath refid="classpath"/> <formatter type="xml"/> <batchtest todir="${tests.output}"> <fileset dir="${build.src}"> <include name="**/*Test.java"/> </fileset> </batchtest> </junit>

  16. Outline • Four CI Systems • Condor Build & Test • CruiseControl • Tinderbox • DART • Example: CruiseControl • Summary

  17. Summary • Current freely available CI systems are crude • CruiseControl is a good choice for Java-based projects • CI Comparison Chart: • http://docs.codehaus.org/display/DAMAGECONTROL • (Click on “Continuous Integration Server Feature Matrix”)

More Related