CruiseControl.rb配置

下载CruiseControl.rb

 

解压

 

tar xzvf cruisecontrol-1.4.0.tgz
 

 

重命名

 

mv cruisecontrol-1.4.0 /var/www/ccrb
 

 

后台启动ccrb

 

/var/www/ccrb/cruise start -d
 

 

注意访问权限( chmod -R 777 /var/www/ccrb )

 

启动后,可以通过http://YourIP:3333访问ccrb

 

将ccrb设置成自启动

 

新建脚本 ccrb_start.sh

 

在脚本中输入以下内容:

 

PATH=/usr/local/ruby/bin:/usr/java/jdk1.5.0_11/bin:$PATH
HOME=/root
export PATH HOME

rm -rf /var/www/ccrb/tmp/pids/mongrel.pid*

/var/www/ccrb/cruise start -d
 

 

 

在/etc/rc.local加入自启动

 

sh /root/ccrb_start.sh
 

 

新增ccrb工程

 

 ./cruise add test --url svn://yourIP/trunk --username xx --password xxx
 

 

修改项目配置文件

 

vim /root/.cruise/projects/eb/cruise_config.rb
 
Project.configure do |project|
  # Send email notifications about broken and fixed builds to [email protected], [email protected] (default: send to nobody)
  # project.email_notifier.emails = ['[email protected]', '[email protected]']

  # Set email 'from' field to [email protected]:
  # project.email_notifier.from = '[email protected]'

  # Build the project by invoking rake task 'custom'
  # project.rake_task = 'custom'

  # Build the project by invoking shell script "build_my_app.sh". Keep in mind that when the script is invoked,
  # current working directory is <em>[cruise&nbsp;data]</em>/projects/your_project/work, so if you do not keep build_my_app.sh
  # in version control, it should be '../build_my_app.sh' instead
  project.build_command = './build_eb.sh'

  # Ping Subversion for new revisions every 5 minutes (default: 30 seconds)
   project.scheduler.polling_interval = 30.minutes

end

 

 

你可能感兴趣的:(SVN,脚本,vim,Ruby,subversion)