Analysis
Overview
The build server should be integrated with the Sophie 2 repository. It should be able to run regular builds.
Task requirements
- Setup the chosen build server to perform builds and to run them regularly.
- Make the build server work with Sophie 2.0 source repository.
- It will be good if the build status could be seen in the trac system. (optional)
Task result
Running build server, that runs tests and builds the Sophie 2.0 application from the source code in the repository.
Implementation idea
On the new SCS machine configure hudson to maintain the source code in svn://asteasolutions.net:7369/sophie2/trunk/sophie2-platform/modules
Related
BUILD_SERVER_INSTANCE_R0
SCS_MACHINE_SETUP_R1
BUILD_SERVER_REPORTS_R0
BUILD_SERVER_DEPLOYMENTS_R0
How to demo
Demonstrate that the build server builds Sophie 2.0 on given time interval.
Design
- See the result of BUILD_SERVER_INSTANCE_R0. Hudson have to be already installed in the sophie2 server.
- You can set "HUDSON_HOME" environment variable to the new home directory before launching the servlet container. This will be used by Hudson for diskspace to perform builds and keep archives.
- To create new job for Hudson go to Hudson top page, select "New Job", then choose "Build a free-style software project". This job type consists of the following:
- a Subversion where your source code resides. Choose the location of the svn in the sophie2 server.
- Optional triggers to control when Hudson will perform builds. The build should be done each morning at 6 AM.
- some sort of build script that performs the build (in our case - maven scripts) where the real work happens.
- Hudson can read dependencies of our project from maven POMs. Triggers are set up in such a way that a new build in one of those dependencies will automatically start a new build of your project. Hudson understands all kinds of dependencies in POM.
- optional steps to collect information out of the build, such as archiving the artifacts and/or recording javadoc and test results.
- Hudson supports plugins, which allow Hudson to be extended to meet specific needs of individual projects.
- optional steps to notify other people/systems with the build result, such as sending e-mails, IMs, updating Trac build status, etc.
- There are really useful movies how to setup and configure Hudson for our needs: http://hudson.gotdns.com/wiki/display/HUDSON/HudsonDemo
- Here is the instructions how to manage the plugins: http://hudson.gotdns.com/wiki/display/HUDSON/Plugins. May be installed:
- Trac plugin which creates links from Hudson projects to Trac instances.
- CheckstylePlugin which generates the trend report for Checkstyle, an open source static code analysis program. http://hudson.gotdns.com/wiki/display/HUDSON/Checkstyle+Plugin
- WarningPlugin which generates the trend report for compiler warnings in the build log. http://hudson.gotdns.com/wiki/display/HUDSON/Warnings+Plugin
- Hudson has native support for JUnit reports and javadoc. After running Hudson and generating the reports see the reports in http://hudson.gotdns.com/wiki/display/HUDSON/Plugins and decide if there is other useful reports which are missed.
Implementation
All is happening on the sophie2.org server:
- JAVA_HOME and PATH are set to point to the jdk not jre.
- A new hudson job to build maven2 project is created
- Hudson is secured. All of the developers have its own accounts which responds to their svn accounts.
- The SVN is connected with Hudson.
- The project was build several times. Hudson knows about separate modules and their dependencies. Last build is unstable because of the test failures.
- There are useful reports - for tests and warnings. When you click on the status you will see Test Result and Compiler Warning Trends.
- Trac plugin is installed. It make link to our Trac in the Hudson menu.
- The server clock must be set correctly for hudson to show the correct time.
Server is running on http://sophie2.org:8080/
Testing
Comments
(Write comments for this or later revisions here.)