Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1147289
  • 博文数量: 312
  • 博客积分: 12522
  • 博客等级: 上将
  • 技术积分: 3376
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-27 18:35
文章分类

全部博文(312)

文章存档

2016年(3)

2015年(1)

2013年(1)

2012年(28)

2011年(101)

2010年(72)

2009年(13)

2008年(93)

分类: 项目管理

2010-06-07 13:14:58

安装Hudson

参考

  1. 加载apt key
    wget -O - | sudo apt-key add -

  2. 修改apt源 /etc/apt/sources.list 加入
    deb binary/

  3. 安装Hudson
    sudo apt-get update
    sudo apt-get install hudson

  4. 安装过程中会自动创建一个用户 hudson, 现在手动把hudson加入到git用户组中, 以便能够有权限clone出gitosis中的git项目 (hudson和gitosis是安装在同一台服务器上的) :
    sudo usermod -g git hudson

  5. 进入hudson帐号, 配置user.email和user.name
    sudo su hudson
    git config --global user.email "hudson@test"
    git config --global user.name "hudson"

安装完成后即可通过浏览器访问部署在8080端口的Hudson

Hudson Home hosted by Ember 为Hudson安装Git和Rake插件

用浏览器进入 “Manage Hudson” > “Manage Plugins” > “Available”, 找到 “GIT plugin” 和 “Rake plugin”, 选中后点击右下角 “Install” 安装

Hudson Install Plugins hosted by Ember 创建CI任务
  1. 选择Free-style模式
    Hudson New Job hosted by Ember

  2. 配置Git repo地址
    Hudson Git repo hosted by Ember

  3. 创建Rake测试任务
    Hudson Rake Cucumber hosted by Ember

配置git hooks, 每次提交代码后自动运行Hudson build

cd /home/git/repositories/xxxx.git/hooks
echo "curl -s http://[YOURHOST]:8080/job/[YOURAPP]/build" > post-update

Tags: , , , ,




Hudson Debian packages

Hudson can be installed as a Debian package, which enables:

  • Automatic upgrade of Hudson via apt
  • /etc/init.d hook up to start Hudson on boot
To use the repository, first add the key to your system: wget -O /tmp/key
sudo apt-key add /tmp/key

Then install Hudson

wget -O /tmp/hudson.deb
sudo dpkg --install /tmp/hudson.deb

Once the package is installed, apt-get update; apt-get install hudson will update Hudson. See for more information.


> wget -q -O - | sudo apt-key > add - > sh -c 'echo deb binary/ > > /etc/apt/sources.list.d/jenkins.list' > aptitude update > apt-get install jenkins > vi /etc/default/jenkins (change port to 8081) > cd /etc/init.d > ./jenkins stop > ./jenkins start
阅读(2540) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~