【工具】Hudson


可以拿來當Term的Build server 。由於跑的是Java,所以Windows/Linux都可以用。

  1. daily/nightly build
  2. 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

  1. negative to http://localhost:8080/
  2. New Job
  3. Assign Job name
  4. Select Build a free-style software project
  5. Then press “OK”

Configure your New Job

  1. negative to Configure
  2. Add build step/Execute shell/
  3. Add below script
    LOG=/tmp/hudson.log
    whoami > $LOG
    ping 168.95.1.1 -c 5 >> $LOG
  4. Press “Save”

Build your Job

  1. Press “Build Now”

Review the result

  1. Select the build result from Build History
  2. Press “Console Output” to show result
  3. 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

  1. Plugin Manager/Avaible
  2. Select “Disk Usage Plugin”
  3. Click “Install”
  4. Follow instruction to restart Hudson
  5. Select Manage Plugin/Disk usage to check result.

【Daily build】

  1. Build Triggers
  2. Select Build periodically
  3. assign Schedule
  4. 可以看說明,基本上和cron類似。

【參考】

 

Ed32. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com