This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
All rights, including in respect of the translation, printing and duplication of this document of parts thereof, are retained. No part of this document may be reproduced or processes with or without electronic means, in any form, without the prior written permission of Atos Worldline. This includes for training purposes.
Document InformationTitle Continuous Integration with Hudson Usage GuideTopic Continuous Integration with Hudson Usage Guide
Name of file Continuous Integration Usage Guideline.docNumber of pages 22
Continuous integration is a process in which all development work is integrated at a predefined time or event and the resulting works is automatically tested and build. The idea is that development errors are identified very early in the process.
Hudson is one open source tool to perform Continuous Integration. The basic functionality of Hudson is to monitor a SCM (Source Control System) and if changes occurs to start and monitor a build system (for example Apache Ant or Maven). Hudson will monitor the whole process and provide reporting functionality and notification functionality to report success or errors.
Hudson can be extended by additional plugins. An installation exists in Seclin and can be accessed via http://wlp.priv.atos.fr:8080/hudson/. Currently the server is used to build project artifacts and transfer them to the Nexus maven repository.
5) Select option « Copy existing job» Input the project name from which you want to make the copy (ex : build wlp-cc-commonobjetcs 3.1). Click “Ok.
6) For naming consistency, use the following pattern as job name: “build” + artifactId of root project.
7) Once you created a job in this way, it is effectively identical to the job you copied except for the job name. So you need to modify the configuration items, for this first navigate the Configure page on the newly created job and add your properties over and save it.
8) After creation, move to Configuration dashboard of this job and add your properties here and save it.
The objective of the "Build" job is to synchronize the workspace source with CVS, update the dependencies, build the projects, run the attached tests and transfer the tested artifacts to a local repository on the host platform.
The definition and configuration of a Hudson build job should be handled by the Hudson administrator together with the delivery manager of the project.
1) Define the name of the job and description. Please note that all build jobs should be called Build <project name> [snapshot|release], e.g. Build wlp-cc (Sonar). We should not create release specific build jobs like Build wlp-cc v2.0. A release should only be built and deployed once. The deployment system will not overwrite an existing artifact in the Nexus repository.
2) Enter/Select the options as displayed in the below screen.
3) Add the CVS details as shown below
a) The current modules source codes are available on the head of the project.
MINUTE Minutes within the hour (0-59)HOUR The hour of the day (0-23)DOM The day of the month (1-31)MONTH The month (1-12)DOW The day of the week (0-7) where 0 and 7 are Sunday.
To specify multiple values for one field, the following operators are available. In the order of precedence,
'*' can be used to specify all valid values. 'M-N' can be used to specify a range, such as "1-5"
'M-N/X' or '*/X' can be used to specify skips of X's value through the range, such as "*/15" in the MINUTE field for "0,15,30,45" and "1-6/2" for "1,3,5"
'A,B,...,Z' can be used to specify multiple values, such as "0,30" or "1,3,5"
Empty lines and lines that start with '#' will be ignored as comments.
In addition, '@yearly', '@annually', '@monthly', '@weekly', '@daily', '@midnight', and '@hourly' are supported.
SOLUTION AND PLATFORM OF PAYMENT
CONTINUOUS INTEGRATION WITH HUDSON
ISSUE: 1.0
DATE: 15/09/2010
5) Specify the project pom file and the maven goals that should be run. The path to the pom.xml file starts at the level of the CVS modules that have been checked out. It is also possible to add extra options to the maven command by clicking on the "Advanced..." button. To skip the project tests add the option "-Dmaven.test.skip=true".
6) Select the Sonar option and enter the relevant details as shown below. Select Build periodically check box if you have schedule your build as mentioned in point 4).
Q1: I entered correct DAS login and DAS Password as required on Hudson Home Page. It did
not display me the configure option.
A1: Reason for this is the DAS Id which you enter should have access rights for that Project. For
this you need to send an email to TPM.
Q2: I tried to run the "Build XXX" job on Hudson to build my project, but I get this error in the console and the build fails. What should I do?
started[workspace] $ /usr/local/bin/cvs -q -z3 update -PdC -D "Wednesday, August 5, 2009 9:35:22 AM UTC"? wlp-ifm-provider/target/classes? wlp-ifm-provider/target/maven-archiver? wlp-ifm-provider/target/test-classes? wlp-ifm-provider/target/wlp-ifm-provider-1.0.1.jarP wlp-ifm-core/src/main/config/resource-bindings.propertiescvs update: move away wlp-ifm-provider/target/classes/IFMServiceContractResources.properties; it is in the wayC wlp-ifm-provider/target/classes/IFMServiceContractResources.propertiescvs update: move away wlp-ifm-provider/target/classes/commoncard.properties; it is in the wayC wlp-ifm-provider/target/classes/commoncard.propertiescvs update: move away wlp-ifm-provider/target/maven-archiver/dummy.txt; it is in the wayC wlp-ifm-provider/target/maven-archiver/dummy.txtcvs update: move away wlp-ifm-provider/target/maven-archiver/pom.properties; it is in the wayC wlp-ifm-provider/target/maven-archiver/pom.properties