Continuous Integration with Continuum, SVN and Maven2

+3

No comments posted yet

Comments

Slide 7

Maven Release Plugin : http://maven.apache.org/plugins/maven-release-plugin/index.html

Slide 8

Copy the url path https://InfoTech-HP/svn/greenfield/trunk mvn archetype:create -DgroupId=com.greenfield.app -DartifactId=greenfield email notification, scm, deployment mvn scm:status scm:svn:https://localhost/svn/greenfield/trunk/greenfield

Slide 10

cd C:\projects\workspaces\programmer01 1.1. svn co https://InfoTech-HP/svn/greenfield/trunk greenfield 1.2. (使用 pom.xml 的 checkout 方式) mvn scm:checkout -DcheckoutDirectory=greenfield mvn scm:checkout -DconnectionUrl=scm:svn:file:////app/svn/repos/branches/one -DscmRevision=2289 -DscmVersionType=revision -DcheckoutDirectory=sample

Slide 16

Verify the automatic building results 程式有變更 時間往後壓(未來的時間)

Slide 25

Fully implemented SCM's Bazaar CVS Mercurial Perforce StarTeam Subversion CM Synergy Partially implemented SCM's Accurev ClearCase Git File system Visual Source Safe

Slide 26

The SCM Plugin has 16 goals: scm:branch - branch the project scm:validate - validate the scm information in the pom scm:add - command to add file scm:unedit - command to stop editing the working copy scm:export - command to get a fresh exported copy scm:bootstrap - command to checkout and build a project scm:changelog - command to show the source code revisions scm:list - command for get the list of project files scm:checkin - command for commiting changes scm:checkout - command for getting the source code scm:status - command for showing the scm status of the working copy scm:update - command for updating the working copy with the latest changes scm:diff - command for showing the difference of the working copy with the remote one scm:update-subprojects - command for updating all projects in a multi project build scm:edit - command for starting edit on the working copy scm:tag - command for tagging a certain revision

Slide 1

Continuous Integration with Continuum, SVN & Maven 報告人:高明權 DATE :2009/10/12 Released V1.01 BLOG:http://tommykao.blogspot.com EMAIL : MCK6214@gmail.com

Slide 2

OVERVIEW

Slide 3

Practices of Continuous Integration Maintain a single source repository Automate the build Make the build self-testing Everyone commits to mainline every day Every commit (to mainline) should be built Keep the build fast Test in a clone of the production environment Easy to get the latest deliverables Everyone can see the results of the latest build Automate Deployment 資料來源: http://martinfowler.com/articles/continuousIntegration.html

Slide 4

Environments – Apache Continuum JDK 5.0 (or above) & JAVA_HOME Download Continuum URL : http://continuum.apache.org/download.html Installation instructions URL : http://continuum.apache.org/docs/1.3.4/installation/installation.html Start App. Sever and verify the results (admin account) Edit user accounts & roles

Slide 5

Environments – VisualSVN Server Download VisualSVN Server URL : Http://www.visualsvn.com/server/download/ Run the setup program Start VisualSVN Server Manager

Slide 6

1st demonstration Green field Project

Slide 7

Scenario Create new project Development Automate Build Checkout Build Unit Test Release & Deployment

Slide 8

Create new project Roles : Software Architect, SE Tools : Subversion, Maven Procedures : create new repository (subversion) create new project (maven) modify the pom.xml setting verify the pom.xml setting import project (subversion)

Slide 10

Development Roles : Programmer Tools : Subversion, Maven Procedures : check out the Greenfield project execute programming tasks (coding, unit test…) check in sources & unit test cases

Slide 12

Automate Build Roles : Software Architect, SE Tools : Subversion, Maven, Continuum Procedures : add new project (continuum) manual build scheduling the automatic build

Slide 13

Step 0: Login Login

Slide 14

Step 1: Add New Project Check the URL path of the configuration file EX: https://localhost/svn/greenfield/trunk/pom.xml Add New Project Confirm the results

Slide 15

Step 2: Manual Build Manual Build Check the results Build History Build Output Quality Reports

Slide 16

Step 3: Scheduling the automatic build Managing Schedules Setup a new schedule pattern Setup the automatic build Build Definitions Add an automate building schedule Verify the automatic building results

Slide 17

Release & Deployment Roles : Software Architect, SE Tools : Subversion, Maven, Continuum Procedures : Prepare for release (continuum) Perform project release Modify pom.xml setting file - add the automate deployment section. Perform project release (continuum)

Slide 18

Modify POM.XML Setting Automate Deployment Section 1/3 Automate Deployment Methods File-based deployment FTP deployment SFTP deployment SSH2 deployment External SSH deployment Deploying to the File System <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> file://${basedir}/target/deploy </url> </repository> </distributionManagement>

Slide 19

Modify POM.XML Setting Automate Deployment Section 2/3 Deploying with FTP <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> ftp://ftpserver.yourcompany.com/deploy </url> </repository> </distributionManagement> <build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ftp</artifactId> <version>1.0-alpha-6</version> </extension> </extensions> </build> Deploying with SFTP <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> sftp://ftpserver.yourcompany.com/deploy </url> </repository> </distributionManagement>

Slide 20

Modify POM.XML Setting Automate Deployment Section 3/3 Deploying with SSH2 <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> scp://sshserver.yourcompany.com/deploy </url> </repository> </distributionManagement> Deploying with an External SSH <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> scpexe://sshserver.yourcompany.com/deploy </url> </repository> </distributionManagement> <build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh-external</artifactId> <version>1.0-alpha-6</version> </extension> </extensions> </build>

Slide 21

Step 1: Prepare for release Prepare for release Setup release plan / tag View release output Confirm with SVN Perform Release

Slide 22

Step 2: Perform project release Modify pom.xml setting Add the automate deployment section Verify with Marven command EX : mvn deploy Commit (check-in) into SVN Perform project release Confirm the release

Slide 23

Continuous Integration Know-How, ExAct, Knowledge 23

Slide 24

參考資料 Apache Maven Better Builds With Maven Maven project descriptor (pom.xml) Apache Continuum Apache Archiva Continuous Integration by Martin Fowler

Slide 25

SCM Repository Fully implemented SCM‘s CVS StarTeam Subversion Mercurial Bazaar Perforce CM Synergy Partially implemented SCM's ClearCase Visual Source Safe File system Accurev Git

Slide 26

Maven SCM Provider Matrix 資料來源:http://maven.apache.org/scm/matrix.html

URL: