Simplest Enterprise Continuous Integration Solutions

Saturday, August 28, 2010

CruiseControl: CruiseControl 2.8.4 on Fedora12

[root@fedora12 ~]# uname -a
Linux fedora12.local.lab 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 i686 i386 GNU/Linux

# install ant

[root@fedora12 ~]# yum install ant

# get java install path

[root@fedora12 ~]# which java
/usr/bin/java

# get java version

[root@fedora12 ~]# java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

# install cruisecontrol-bin-2.8.4.zip

[root@fedora12 ~]# cd /usr/local
[root@fedora12 ~]# unzip /tmp/crusiecontrol-bin-2.8.4.zip

# edit cruisecontrol.sh and insert below after line 70

JAVA_HOME="/usr/default/java"
PATH=${JAVA_HOME}/bin:${PATH}

#Update below 2 lines for custom ports

EXEC="$JAVA_HOME/bin/java $CC_OPTS -Djavax.management.builder.initial=mx4j.server.MX    4JMBeanServerBuilder -Dcc.library.dir=$LIBDIR -Djetty.logs=$JETTY_LOGS -jar $LAUNCHE    R $@ -jmxport 8000 -webport 8080 -rmiport 1099"
echo $EXEC
$JAVA_HOME/bin/java $CC_OPTS -Djavax.management.builder.initial=mx4j.server.MX4JMBea    nServerBuilder "-Dcc.library.dir=$LIBDIR" "-Djetty.logs=$JETTY_LOGS" -jar "$LAUNCHER    " $@ -jmxport 8000 -webport 8080 -rmiport 1099 &

EXEC="$JAVA_HOME/bin/java $CC_OPTS -Djavax.management.builder.initial=mx4j.server.MX    4JMBeanServerBuilder -Dcc.library.dir=$LIBDIR -Djetty.logs=$JETTY_LOGS -jar $LAUNCHE    R $@ -jmxport 8100 -webport 8180 -rmiport 1199"
echo $EXEC
$JAVA_HOME/bin/java $CC_OPTS -Djavax.management.builder.initial=mx4j.server.MX4JMBea    nServerBuilder "-Dcc.library.dir=$LIBDIR" "-Djetty.logs=$JETTY_LOGS" -jar "$LAUNCHER    " $@ -jmxport 8100 -webport 8180 -rmiport 1199 &

# create symbolic link

[root@fedora12 ~]# sudo ln –s /usr/local/cruisecontrol-bin-2.8.4 /opt/cruisecontrol
/opt/cruisecontrol/cruisecontrol.sh

# CruiseControl dashboard 



Saturday, August 7, 2010

Enterprise Linux: SVN + SSH on Fedora12


[root@fedora12 ~]# uname -a
Linux fedora12.local.lab 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 i686 i386 GNU/Linux

[root@fedora12 ~]# umask 002
[root@fedora12 ~]# yum install subversion
[root@fedora12 ~]# yum update sqlite

# go to root of repositories

[root@fedora12 ~]# mkdir –p /srv/svn_repo/
[root@fedora12 ~]# chown -R root:svn /srv/svn_repo
[root@fedora12 ~]# chmod -R 775 /srv/svn_repo

# user supplementary group for access control

[root@fedora12 ~]# id qxie
uid=506(qxie) gid=506(users) groups=506(users),502(svn)

# enable Subversion+SSH - hide root of repositories

[root@fedora12 ~]# mv /usr/bin/svnserve /usr/bin/svnserve.bin
[root@fedora12 ~]# cat /usr/bin/svnserve
#!/bin/sh
# wrap in order to put root in by default
exec /usr /bin/svnserve.bin -r /srv/svn_repo "$@"
[root@fedora12 ~]# chmod 755 /usr/bin/svnserve

# create repo for my_project

[root@fedora12 ~]# svnadmin create /srv/svn_repo/my_project

# edit /srv/svn_repo/my_project/conf/svnserve.conf with below uncomments

anon-access = none
auth-access = write

[qxie@fedora12 ~]$ svn list svn+ssh://qxie@fedora12.local.lab/my_project

# source tree is going to import

[root@fedora12 ~]# find /tmp/svn_import/
/tmp/svn_import/
/tmp/svn_import/test_cases
/tmp/svn_import/test_cases/tags
/tmp/svn_import/test_cases/branches
/tmp/svn_import/test_cases/truck
/tmp/svn_import/test_cases/truck/test_cases
/tmp/svn_import/test_cases/truck/test_cases/dir
/tmp/svn_import/test_cases/truck/test_cases/dir/case2.txt
/tmp/svn_import/test_cases/truck/test_cases/case1.txt

# svn import

[qxie@fedora12 ~]$ cd /tmp/svn_import
[qxie@fedora12 svn_import]$ svn import test_cases svn+ssh://qxie@fedora12.local.lab/my_project -m "initial commit"
[qxie@fedora12 ~]$ svn list svn+ssh://qxie@fedora12.local.lab/my_project
branches/
tags/
truck/

# create branch

[qxie@fedora12 ~]$ svn copy svn+ssh://qxie@fedora12.local.lab/my_project/truck svn+ssh://qxie@fedora12.local.lab/my_project/branches/dev_1_br -m "creating dev_1_br"

# create tag

svn copy svn+ssh://qxie@fedora12.local.lab/my_project/truck svn+ssh://qxie@fedora12.local.lab/my_project/tags/tag_R1.0 -m "creating tag R1.0"

# rapdisvn GUI

[root@fedora12 ~]# yum install rapdisvn


# checkout with rev

[qxie@fedora12 ~]$ svn co -r2 svn+ssh://qxie@fedora12.local.lab/my_project/branches/dev_1_br r2

svn log

[svn_user@fedora12 ~]$ svn log -r1:2
------------------------------------------------------------------------
r1 | qxie | 2010-08-07 12:44:11 -0400 (Sat, 07 Aug 2010) | 1 line

initial commit
------------------------------------------------------------------------
r2 | qxie | 2010-08-07 12:46:17 -0400 (Sat, 07 Aug 2010) | 1 line

creating dev_1_br

# svn info

[qxie@fedora12 ~]$ svn info
Path: .
URL: svn+ssh://qxie@fedora12.local.lab/my_project/branches/dev_1_br
Repository Root: svn+ssh://qxie@fedora12.local.lab/my_project
Repository UUID: cbc29f11-edc8-4111-9b23-d15b91d85c83
Revision: 2
Node Kind: directory
Schedule: normal
Last Changed Author: qxie
Last Changed Rev: 2
Last Changed Date: 2010-08-07 12:46:17 -0400 (Sat, 07 Aug 2010)
[qxie@fedora12 ~]$ svn info -r2 svn+ssh://qxie@fedora12.local.lab/my_project/branches/dev_1_br
Path: dev_1_br
URL: svn+ssh://qxie@fedora12.local.lab/my_project/branches/dev_1_br
Repository Root: svn+ssh://qxie@fedora12.local.lab/my_project
Repository UUID: cbc29f11-edc8-4111-9b23-d15b91d85c83
Revision: 2
Node Kind: directory
Last Changed Author: qxie
Last Changed Rev: 2
Last Changed Date: 2010-08-07 12:46:17 -0400 (Sat, 07 Aug 2010)