可以拿來當Term的Build server 。由於跑的是Java,所以Windows/Linux都可以用。
- daily/nightly build
- formal relese control center
【安裝】
以Ubuntu/Debian為base。參考 http://hudson-ci.org/debian/。
【啟動】
root@ed-desktop:/# cd /usr/share/hudson/
root@ed-desktop:/usr/share/hudson# java -jar hudson.war
【設定】
Create a New Job
- negative to http://localhost:8080/
- New Job
- Assign Job name
- Select Build a free-style software project
- Then press “OK”
Configure your New Job
- negative to Configure
- Add build step/Execute shell/
- Add below script
LOG=/tmp/hudson.log
whoami > $LOG
ping 168.95.1.1 -c 5 >> $LOG - Press “Save”
Build your Job
- Press “Build Now”
Review the result
- Select the build result from Build History
- Press “Console Output” to show result
- or just cat =/tmp/hudson.log
root@ed-desktop:~# cat /tmp/hudson.log
hudson
PING 168.95.1.1 (168.95.1.1) 56(84) bytes of data.
64 bytes from 168.95.1.1: icmp_seq=1 ttl=245 time=162 ms
64 bytes from 168.95.1.1: icmp_seq=2 ttl=245 time=127 ms
64 bytes from 168.95.1.1: icmp_seq=3 ttl=245 time=155 ms
64 bytes from 168.95.1.1: icmp_seq=4 ttl=245 time=117 ms
64 bytes from 168.95.1.1: icmp_seq=5 ttl=245 time=178 ms…
【CLI】
透過cli可以重開Hudson
java -jar /var/run/hudson/war/WEB-INF/hudson-cli.jar -s http://localhost:8080/ help
【Plugin】
Add new Plugin
- Plugin Manager/Avaible
- Select “Disk Usage Plugin”
- Click “Install”
- Follow instruction to restart Hudson
- Select Manage Plugin/Disk usage to check result.
【Daily build】
- Build Triggers
- Select Build periodically
- assign Schedule
- 可以看說明,基本上和cron類似。
【參考】
- Hudson http://hudson-ci.org/
- Hudson Build Monitor 1.0.2
https://addons.mozilla.org/zh-TW/firefox/addon/7522?src=reco - 資料較多
http://search.qihoo.com/sint/qusearch.html?kw=Hudson&stype=content&domain=bbs.scmlife.com&sort=rank&tshow=1 - 也有提供 RSS的功能。