ãç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ããã¼ã«Hudsonã使ã£ãæåã®ä¸æ©ã§ããæ°ãããã¼ã«ã¯ä½¿ãã¯ãããã®ã«æ·å± ãããã®ã§ãHudsonã«ãããæ·å± ãè¶ããåèã«ã¨æ¥è¨ãããããã¦ã¿ã¾ããã
åç½®ã
ç¾å¨ã®ããã¸ã§ã¯ãã§ã¯ãæ¯é±ãªãªã¼ã¹ãè¡ã£ã¦ããã®ã§ãããæ人ä½æ¥ã®ãããä½æ¥ãéå§ãã¦ãã«ãã¨ã©ã¼ãçºçããã¨ããã®ãã³ã«é¢ä¿è ãèãã¾ãã£ã¦èª¿æ´ãã¦ãã¨ããä½æ¥ãå ¥ãã¾ãã
ãã«ãã®èªååï¼å®æåï¼ã¯ãå½åããã®åºæ¥ãããããªãªã¹ãã«æãããã¦ãã¾ãããæãåããã«å¾åãã«ãªã£ãã¾ã¾ç¾å¨ã«è³ã£ã¦ãã¾ãã試é¨ä½æ¥ã®ã¦ã§ã¤ããå¢ãã¦ããææã«ããã«ãå°ä»»è ãå¤ãããã¾ãã¾ãæãåã°ãªããªã£ã¦ãã¾ãã¾ããããªãªã¼ã¹ä½æ¥ã大äºã«ãªã£ã¦ããããã¸ã§ã¯ãçµç¤ã§ãããäºç®çè¦å ã®ãããã人éã§ä½ã¨ãããã¨ã»ã»ã»ï¼å¤§è¦æ¨¡ã ãã¨ãããªããããã«ãæ å½ãæ§æ管çæ å½ãå°ä»»åãããªãã»ã»ã»ï¼ã
ãã«ãã®èªååã§æãã¤ãæã¯ãUNIXç³»ãªãcronã§ä¸å®æå»ã«èªåå®è¡ãããããåãè¡ãããã«ãèªåå®è¡çµæãã¹ã¯ãªããã§å å·¥ãã¦HTMLåããã¦Webããè¦ããããã«ãããã¨èª°ã§ãèãä»ããããªãã¨ã§ããããã®æã®ä½æ¥ã¯æ¡å¤ã¨æéã²ã¾ã®ããããã®ã§ããªããªãå®ç¾ã§ãã¾ããã
ã¾ããã·ã§ã«ã¹ã¯ãªãããcronãHTMLããæããªããã°ãªããªãã¨ããã®ãU30ãªèªç§°ãã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ãã®å¹³åã¬ãã«ããããããã¼ã¨è¨ã£ã¦ããããã«ã¯éãããããããã§ãã
ãããªã¨ããJavaçéã§æããåå¨ã¯ç¥ã£ã¦ãããç¶ç¶çãªãã«ãããã¼ã«ã®Hudsonããå®ã¯ãJavaã®ãã«ãã®ããã®ãã®ã§ã¯ãªããcronã«å¤ãã£ã¦ã·ã§ã«ã¹ã¯ãªãããå®è¡ããæ©è½ããããã¨ãããã¨ãç¥ãã¾ããããããªãã°ãC++ã®ããã¸ã§ã¯ããåé¡ãªããã«ãã§ãããã§ãã
ã¨ãããã¨ã§ãåçªã«Hudsonãåããã¦ã¿ã¾ããã
ã¾ãã¯Hudsonã®ã¤ã³ã¹ãã¼ã«
ãã¤ã³ã¹ãã¼ã«ä½æ¥ãã¨èº«æ§ããå¿ è¦ã¯å ¨ç¶ããã¾ãããHudsonã«ã¤ãã¦ã¯ããèãããªãæãããã§ããé ã使ãåã«ã¾ãåããã¦ã¿ã¦ããããããã調ã¹ããªãèããã®ã§ããåã¯ã©ã¡ããã¨ããã¨äºåã«ä¸èª¿ã¹ããããä»çµã¿ã調ã¹ã¦ããã§ãªãã¨æ°ããæè¡ã使ã£ã¦ãããªãã¿ã¤ããªã®ã§ããèãããªãæãããã¨ããããæ¹ã¯å°ãã¹ãã¬ã¹ãããã¾ãããHudsonã«ã¤ãã¦ã¯ãããæ©éã§ãã
ã¾ããHudsonã®ããã¸ã§ã¯ããµã¤ãï¼ä»¥ä¸URLï¼ã«ã¢ã¯ã»ã¹ããDownloadï¼latest and greatï¼ãã¯ãªãã¯ãã¾ãããã©ã¦ã¶ãhudson.warãä¿åãããèãã¦ãã¾ããããã©ãã§ããããã¨ã«ããä¿åãããã§ããã.warã¨ã¯ãã£ããä½è
ï¼ãã¨ãããã¼ã¸ã§ã³ã¯ããã¤ãªãã ï¼ãã¨èºèºãã¦ããã£ã³ã»ã«ãã¿ã³ãæ¼ãã¦ä¿åãããã¦ã¯ããã¾ããã
https://hudson.dev.java.net/
ãã£ãã¨å®è¡ãã¾ããã
ã¤ã³ã¹ãã¼ã«ã¯å®äºã§ãããã£ï¼ãã¤ã³ã¹ãã¼ã«ã¯ã©ããªã£ããã ï¼ããªã©ã¨èãã¦ã¯ããã¾ãããwarãã¡ã¤ã«ã¨ã¯ä½ï¼ JavaEEã¨ã¯ï¼ ãããã¤ã¨ã¯ï¼ ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¯ï¼ã¨æã£ã¦ãã¾ãã¨ãããã«ä¸é±éã¯Hudsonããããã£ã¦ã®æ¹åã«æ ãã£ã¦ãã¾ãã¾ãã
ãããHudsonã®ã¤ã³ã¹ãã¼ã«ã¯ãhudson.warãã¡ã¤ã«ããã·ã³ã«ä¿åããæç¹ã§çµãã£ã¦ããã®ã§ãããã¤ã§ãå®è¡å¯è½ç¶æ ã§ãããããå®è¡ãã¾ãããã以ä¸ã®ã³ãã³ããå ¥ãã¦ãã ããã
$ java -jar hudson.war
ãã¨ã¯ããã©ã¦ã¶ããhttp://localhost:8080 ã«ã¢ã¯ã»ã¹ãã¾ããããã§å®è¡ã¯çµããã§ãããã¨ã¯ãå®è¡ãããã³ãã³ãããã©ã¦ã¶ããè¨å®ãã¾ããwarãã¡ã¤ã«ãjarã§å®è¡ï¼ãªã©ã¨èãã¦ã¯ããã¾ããããã°ããããã¨ã«ãå èµã®Webãµã¼ããåãã¦ããã®ã§ããå¾æ¥æ£å¼éç¨ããã¨ãã«ãå¿ è¦ã§ããã°ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«é åããã°ããã®ã§ãã
è¨å®
ãã¦ãè¨å®æ¹æ³ã¯ã©ãããã®ã調ã¹ãªãã¨ã»ã»ã»ãã¨Googleãããæ¢ãåã£ã¦ãã¾ãã¨ãã¾ãHudsonããæå¾æ¥ã®æ¹åã«é£ãã§ãã£ã¦ãã¾ãã¾ããHudsonã®ç»é¢ï¼ãã©ã¦ã¶ä¸ï¼ã¯ãåè¨å®é ç®ã®å³èã«'ï¼'ã®ã¢ã¤ã³ã³ããããããã«èª¬æãããã¾ããã¨ã«ãã使ã£ã¦åãããªãã¨ãã¯'ï¼'ãæ¼ãã¦ã¿ããã¨ããå½¢ã§ãªãã¦ããã®ãããã§ãããã
æåã®ä¸æ©
ãã«ãããã¸ã§ã¯ãã1ã¤ä½æãã¾ããã¾ãæåã®ä¸æ©ãªã®ã§ãå®é¨ã§ä½ã£ãå°ããªC++ããã°ã©ã ãæå®ãã¦ä½ãã¾ãã
è¨å®é ç® | è¨å®å 容 |
---|---|
ããã¸ã§ã¯ãå | å§ãã¾ãã¦ãMr.Hudson |
説æ | C++ã®ãã¹ãã¢ããªã±ã¼ã·ã§ã³ããã«ããã¾ããC++ã®ãã«ãç°å¢ã¯ãMPCã使ã£ã¦GNUmakeç¨Makefileãçæããå¾ãGNUmakeã§ãã |
ãã«ãæé ã®è¿½å | ã·ã§ã«ã®å®è¡ |
ã·ã§ã«ã¹ã¯ãªãã | å¾è¿° |
ã·ã§ã«ã¹ã¯ãªããæ¬ã«ã¯ä»¥ä¸ãè¨è¿°ãã¾ããã
cd /home/torutk/work/cxx/sqlite/hello mwc.pl -type make make realclean make
ã·ã§ã«ã®å®è¡æãã«ã¬ã³ããã£ã¬ã¯ããªã¯Hudsonãå®è¡ãããã£ã¬ã¯ããªã«ãªããããªã®ã§ãããã§ã¯çµ¶å¯¾ãã¹ã§æå®ãã¾ãã
mwc.plã¯ãACE+TAOã®ãã«ãã§ä½¿ããã¦ãããå種ãã«ããã¼ã«ç¨ã®è¨å®ãã¡ã¤ã«ãçæãããã¼ã«ã§ãããã§ã¯GNU makeç¨Makefileãçæããã®ã«ä½¿ã£ã¦ãã¾ãã
make ã§ã¯ãªã¼ã³ãã«ãããã¦ãã¾ãã
ãã以å¤ã®è¨å®ã¯ããã©ã«ãã®ã¾ã¾ï¼æªæå®ï¼ã§ããã½ã¼ã¹ã³ã¼ã管çã·ã¹ãã ã¨ã®é£æºã¯ãªãããã«ãã»ããªã¬ããªãã§ãã
æåã®ä¸æ©ã¯ããããã¯ããã¾ãã
ãã«ããã対象ããªããã¼
ã¨è¨ãæ¹ããä»»æã®ãã£ã¬ã¯ããªã«Hello Worldããã°ã©ã ãä½æããMakefileãè¨è¿°ãã¦ããããHudsonããå®è¡ããããã«ã·ã§ã«ã¹ã¯ãªãããè¨è¿°ããã°ã3åéã§ãã«ããå®æ½ã§ãã¾ãã
Hudsonã«ããåãã«ã
ä½æãããå§ãã¾ãã¦ãMr.Hudsonãããã¸ã§ã¯ããé¸æããå·¦å´ã¡ãã¥ã¼ã®ããã«ãå®è¡ããé¸æããã¨ãã«ããéå§ããã¾ãã
ããã§OKã§ãããã«ãå±¥æ´æ¬ã«æ°ãããã«ãã追å ããã¾ããæåããã¨ãã¯ããã«ãå±¥æ´æ¬ã«éãçã®ã¢ã¤ã³ã³ä»ãã§è¡¨ç¤ºããã¾ãã
ãã«ã失ææã®æåãè¦ã
ãã«ããæåããã¨ã表示ä¸éçã¢ã¤ã³ã³ã®ã¿ã§ã¤ã¾ããªãã®ã§ãã½ã¼ã¹ã³ã¼ããããã£ã¦ã¨ã©ã¼ãåºãããã«ãã¦ããã«ãã«ããå®è¡ãã¦ã¿ã¾ããã
ä»åº¦ã¯ãã«ãå±¥æ´ã«èµ¤çã®ã¢ã¤ã³ã³ä»ãã§è¡¨ç¤ºããã¾ããã
ãã«ãã®å®è¡ã¯ãRSSãã£ã¼ãã§é ä¿¡ãããã®ã§ãããããªã¼ãã¼ã«è¨å®ãã¦ããã¨ããããã§ãã
Hudsonåæ¥ã¡ã¢
- ããã¸ã§ã¯ãè¨å®ã®ãã¼ã¿ã¯ã©ãã«ï¼
è¨å®ãããã¼ã¿ã¯ãHudsonãå®è¡ããã¦ã¼ã¶ã»ã¢ã«ã¦ã³ãã®ãã¼ã ãã£ã¬ã¯ããªã«ã$HOME/.hudsonã¨ãããã£ã¬ã¯ããªãçæããããã®ä¸ã«ä½ããã¦ãã¾ããã
- ãã«ãã失æãããã©ãã¨ã©ã¼å 容ã¯ã©ããè¦ãã°ï¼
ãã«ãå±¥æ´ãã¯ãªãã¯ããã¨ãå·¦å´ã¡ãã¥ã¼ã«ãã³ã³ã½ã¼ã«åºåãã表ãããã®ã§ããããã¯ãªãã¯ãã¾ãã
- ãã«ãçµæã®ãã°ã¯ã©ãã«ï¼
$HOME/.hudson/jobs/åãã¾ãã¦ãMr.Hudson/builds/2009-08-23_16-20-03/log
ã®ããã«ããã¼ã ãã£ã¬ã¯ããªä¸ã®.hudsonã®ä¸ã«jobs/<ããã¸ã§ã¯ãå>/builds/<ãã«ãå®è¡å¹´ææ¥æåç§>
ã®ãã£ã¬ã¯ããªã«logã¨ãããã¡ã¤ã«åã§åããã¾ããã¾ããbuildsãã£ã¬ã¯ããªã®ä¸ã¯ããã«ãçªå·ã®ã·ã³ããªãã¯ãªã³ã¯ãã¡ã¤ã«ã対å¿ãããã«ãå®è¡å¹´ææ¥æåç§ãã£ã¬ã¯ããªã«ãªã³ã¯ããããã«ä½ããã¦ãã¾ãã
- Hudsonã®ãã¼ã¸ã§ã³ã£ã¦ï¼
Hudsonãèµ·åãã¦ããã©ã¦ã¶ããã¢ã¯ã»ã¹ããã¨ãã¼ã¸ã®å³ä¸ã«ãã¼ã¸ã§ã³çªå·ã表示ããã¦ãã¾ãã
- ãã¼ãçªå·ãããã©ã«ãã®8080以å¤ã«ããã«ã¯ï¼
èµ·åæã«ã--helpãªãã·ã§ã³ãæå®ãã¦èª¿ã¹ã¾ãã
$ java -jar hudson.war --help Running from: /home/torutk/work/hudson/hudson.war Hudson Continuous Integration Engine ? Usage: java -jar hudson.war [--option=value] [--option=value] Options: :ï¼ä¸ç¥ï¼ --httpPort = set the http listening port. -1 to disable, Default is 8080
ãããè¦ã¦ãæ¸å¼ï¼Usageï¼ã«ããæ§å¼ã§æå®ãã¾ãã
$ java -jar hudson.war --httpPort=8087
åèURL
Hudsonéçºè
ã§ããå·å£èä»ããèªèº«ã®è¨äºã§ãã
ææ³
UNIXç³»OSãç¥ã£ã¦ãã¦ããcronã¨ã¹ã¯ãªããã§é å¼µãã®ã¯æéããããã¾ããããã«å¯¾ãã¦Hudsonã¯ãã¨ããããããã£ã¨ããéã«ä½ãä¸ãããã¾ãããã¼ããä»ã¾ã§Javaã®ãã«ãå°ç¨ãã¨æã£ã¦ããã®ã§ããããããããããªãã¨ã¯ãªããC++ã®ãã«ãç°å¢ã§ãç°¡åã«å®ç¾ã§ãã¾ãããæåã®ä¸æ©ã¨ãã¦ã¯ä¸ã ã§ãã
ãã¨ã¯ãSubversionãããã§ãã¯ã¢ã¦ãããããå®æãã«ããå®è¡ã§ããããã«ãããã¨ã追å ãã¦ããã°ããããã§ããã¾ããã¤ã³ã¹ãã¼ã«ãã¨ã£ã¦ãç°¡åãªã®ã§ã空ãã¦ãããã·ã³ã«ã©ãã©ãä»æãããã¾ãã
ãã«ãå®è¡çµæã¯ãEmailã«ããéç¥ãRSSãã£ã¼ãã«ãªã£ã¦ãã¾ãã¾ãããIRCãTwitterçã¸éç¥ãããã©ã°ã¤ã³ããã模æ§ã§ããã¾ããéããç°å¢ã§ã®éçºã§ã¯ãããããRSSã§ããããã