ä»ã§ã¯ãèªååããããããžã§ã¯ãã®ã¢ã»ã³ããªãšãã¹ããªãã®ãœãããŠã§ã¢éçºãæ³åããã®ã¯å°é£ã§ãã éçºè ã®å€æŽããããžã§ã¯ãã«çµ±åããã®ã«ãããæéãæå°éã«æããããã«ãããŸããŸãªæ¢è£œã®ãœãªã¥ãŒã·ã§ã³ããããŸãã ãã®èšäºã§ã¯ãPVS-StudioéçºããŒã ã§CruiseControl.NETç¶ç¶ççµ±åãµãŒããŒãJenkinsã«çœ®ãæããããšã«ã€ããŠèª¬æããŸãã ãŸãããããç§ãã¡ã«ä¿ãããã®ãè¿œæ±ããç®æšãçŽé¢ããåé¡ã«ã€ããŠãã
ã¯ããã«
ç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ïŒEngãç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ã以äžCIãšåŒã³ãŸãïŒã¯ãéçºããããœãããŠã§ã¢ãçµã¿ç«ãŠãå±éããã¹ãããèªåããã»ã¹ã§ãã ãã®éçºææ³ã¯ã倧èŠæš¡ãªããŒã ã§ãå人ã®éçºè ã§ã人æ°ããããŸãã ãã®ãã©ã¯ãã£ã¹ã«ã¯å€ãã®æ¢æã®ãœãªã¥ãŒã·ã§ã³ããããŸãã ãã®èšäºã§ã¯ãCruiseControl.NETãšJenkinsã®ç¡æã®ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã«ã€ããŠèª¬æããŸãã
CruiseControl.NET ïŒCCNetïŒã¯ã.NET Frameworkã«å®è£ ãããç¶ç¶çãªãœãããŠã§ã¢çµ±åã®ããã®ããŒã«ã§ãã JavaããŒã«ãªãã·ã§ã³ïŒCruiseControlïŒãšRubyç°å¢ããŒãžã§ã³ïŒCruiseControl.rbïŒããããŸãã ã¢ã»ã³ããªã«é¢ããæ å ±ã®ç®¡çãšè¡šç€ºã¯ãWebã€ã³ã¿ãŒãã§ã€ã¹ãŸãã¯ãã¹ã¯ããããŠãŒãã£ãªãã£ãä»ããŠå®è¡ãããŸãã ããŸããŸãªããŒãžã§ã³ç®¡çã·ã¹ãã ãšçµ±åããŸãã ããã¯ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã§ãããæ®å¿µãªãã2013幎é ããéçºãããŠããŸããã
Jenkinsã¯ãJavaã§èšè¿°ããããªãŒãã³ãœãŒã¹ã®ç¶ç¶ççµ±åããŒã«ã§ãã Oracleãšã®è«äºã®åŸã ãããœã³ãããžã§ã¯ãããåå²ããŸããã ç¶ç¶çãªçµ±åæ©èœãæäŸããããšã«ããããœãããŠã§ã¢éçºããã»ã¹ã®äžéšãèªååã§ããŸãããã®ããã»ã¹ã§ã¯ã人éã®åå ã¯äžèŠã§ãã Jenkinsã®æ©èœã¯ãã©ã°ã€ã³ã§åŒ·åã§ããŸãã çŸæç¹ã§ã¯ããããžã§ã¯ãã¯éçºè ãšã³ãã¥ããã£ã®äž¡æ¹ã«ãã£ãŠç©æ¥µçã«éçºããã³ãµããŒããããŠããŸãã
ãã®èšäºã¯CCNet察ã¹ã¿ã€ã«ã¬ãã¥ãŒã«å°ã䌌ãŠããŸãã Jenkinsãããã©ãŒã«ã¹ã¯ããã«Jenkinsã§ãµãŒããŒãéžæããããšã«ãªããŸãã ç¶ç¶ççµ±åããŒã«ãå€æŽããäž»ãªçç±ã¯ãCruiseControl.NETãããžã§ã¯ãã®éçºã®äžè¶³ã§ãã ãŸãããã®èšäºã§ã¯ãå°é£ãçããCCNetã§ã®äœæ¥ã®ä»ã®åŽé¢ã«ã€ããŠã説æããŸãã
æè¿ãPVS-Studioãããžã§ã¯ãã«ã¯10ââ幎ã®èšå¿µæ¥ããããŸãããããã¯ãã PVS-Studioãããžã§ã¯ãã10幎åã«ã©ã®ããã«å§ãŸã£ãã®ã ããšããèšäºã«ãããŸãã 補åã®å¯¿åœã®åå以äžã®éãCCNetã䜿çšããŠããŸãã ãã®ã€ã³ã¿ãŒãã§ã€ã¹ãèšå®ãæ©èœã¯éåžžã«éŠŽæã¿ã®ãããã®ã«ãªã£ãããããžã§ã³ãã³ã¹ã¯éåžžã«äžå¿«ã«æããŸããã LinuxåãPVS-Studioãç»å Žãããšãã«æåã«äœ¿çšãéå§ããŸããã Jenkinsãžã®ç§»è¡ã®åã«ããã®ããŒã«ã®é·ãç 究ãè¡ãããŸããã CCNetã®äœ¿ãæ £ããæ©èœã®é¡äŒŒç©ãæ¢ãã®ã«è²»ãããæéã®äžéšã 次ã«ãå®äºããäœæ¥ã®èå³æ·±ãç¹ã«ã€ããŠèª¬æããŸãã
CCNetã«å¯Ÿããåœç€Ÿã®äž»åŒµ
- CCNetã¯çŸåšéçºãããŠããŸããã ããã§ã䜿çšã§ããŸãããæ©èœãæ¡åŒµããæ¢åã®/æœåšçãªãšã©ãŒãä¿®æ£ããã«ã¯ãç¬èªã«ãããè¡ãå¿ èŠããããŸãã
- å€æŽã®SCMïŒãœãŒã¹ã³ãŒã管çïŒããŒãªã³ã°ã¢ãŒãã¯äžå®å®ã§ããã€ãŸããããŒãžã§ã³ç®¡çã·ã¹ãã ã«å€æŽãããå Žåã®èªåèµ·åã§ãã ãããã¯ãŒã¯ã«åé¡ãããå Žåããã®ã¢ãŒãã§ã¯ããããžã§ã¯ããéå§ããŠããªããŠãããããžã§ã¯ãã®ã¹ããŒã¿ã¹ã¯ã倱æãã«ãªããŸãã å®éã«ã¯ãåé¡ãé »ç¹ã«çºçããããïŒæ®å¿µãªãããåœç€Ÿã®ãªãã£ã¹ã«ã¯æãå®å®ããã€ã³ã¿ãŒãããã¢ã¯ã»ã¹ããããŸããïŒããã®ã¢ãŒãã䜿çšã§ããªããªããŸãã
- ããŒãžã§ã³ç®¡çã·ã¹ãã ã§ãšã©ãŒãçºçããå ŽåïŒããšãã°ãèšå®ã§æå®ããããã£ã¬ã¯ããªããªããžããªããåé€ãããããªãŒã®ç«¶åãçºçããå ŽåïŒãå€æŽã«ã€ããŠSCMã«åãåããããšããããžã§ã¯ãã¯ããã«äžæãããæåã¹ããŒã¿ã¹ãç¶æããŸã-ãããžã§ã¯ãã¯åäœãåæ¢ããŸããã ãããŠã§ãã€ã³ã¿ãŒãã§ãŒã¹ãšãã¹ã¯ããããŠãŒãã£ãªãã£ã®ã¹ããŒã¿ã¹ã¯ãã°ãªãŒã³ãã®ãŸãŸã§ãã ãã®ã¢ãŒãã§ã¯ãããšãã°ããã¹ãã®èµ·åã«æ°é±éã¯ããããªãå Žåãããããã¹ããæ£åžžã«æ©èœããŠãããšèããŠèª°ãããã«æ³šæãæããªããšãããªã¹ã¯ããããŸãã
- äžè¬çãªãµãŒããŒæäœãã°ã¯åé·ãããŠæ§é åãããŠããŸãããã©ã®ã¢ã»ã³ããªã¹ããããèœã¡ãããç解ãããã®ç¹å®ã®ã¹ãããã®ãã°ãèŠã€ããããšã¯å°é£ã§ãã è€æ°ã®ãããžã§ã¯ãã䞊è¡ããŠåäœããå Žåããã«ããã°ã¯ãæ··åããããŸãã 1ã€ã®ãããžã§ã¯ãã®XMLãã«ããã°ã¯Webã€ã³ã¿ãŒãã§ãŒã¹ã§å©çšã§ããŸãããéã«è©³çŽ°ãäžååã§ããããšãå€ããå®è¡ããããã¹ãŠã®ã³ãã³ããå«ãŸããŠããŸããã
- ãããžã§ã¯ãå ã®ãµãã¿ã¹ã¯ã®éå¹ççãªäžŠååã ãµãã¿ã¹ã¯ã¯ãããã»ããµã³ã¢ã®æ°ããšã«ã°ã«ãŒãã§äžŠåã«å®è¡ãããŸãã é·ããŠéãã¿ã¹ã¯ãã°ã«ãŒãã«åé¡ãããå Žåãååã®èµ·åããã®ãã¹ãŠã®ã¿ã¹ã¯ãå®äºãããŸã§ãæ°ããã¿ã¹ã¯ã¯èµ·åãããŸããã
ãŠãŒã¹ã±ãŒã¹æ¯èŒ
ãµãŒããŒèšå®
CCNetãããžã§ã¯ãèšå®ïŒãµãŒããŒæ§æïŒã¯1ã€ã®xmlãã¡ã€ã«ã«ä¿åãããå¥ã®ãã¹ã¯ãŒãã¯å¥ã®ãã¡ã€ã«ã«ä¿åãããŸããã èšå®ãã¡ã€ã«ã¯çŽ4,500è¡ã«éããŸãããã䜿çšãããšéåžžã«äŸ¿å©ã§ããã ã¡ã¢åž³++ã§Alt + 2ã軜ãæŒããšããã¹ãŠã®ãããžã§ã¯ãã®ãªã¹ããæãããã¿ãå¿ èŠã«å¿ããŠç·šéã§ããŸãïŒå³1ïŒã
å³1-ã¡ã¢åž³++ã§ã®CCNetèšå®ã®ç·šé
ãã¡ã€ã«ã«ã¯éè€ããã³ãŒããå«ãŸããŠããŸãããããµãŒããŒãµããŒãã«ç¹å¥ãªåé¡ã¯ãããŸããã§ããã
ããã¯SCMãããã¯ãã©ã®ããã«èªã¿èŸŒãŸãããã§ãïŒ
<svn> <username>&SVN_USERNAME;</username> <password>&SVN_PASSWORD;</password> <trunkUrl>&SVN_ROOT;...</trunkUrl> <workingDirectory>&PROJECT_ROOT;...</workingDirectory> <executable>&SVN_FOLDER;</executable> <deleteObstructions>true</deleteObstructions> <cleanUp>true</cleanUp> <revert>true</revert> <timeout units="minutes">30</timeout> </svn>
ãã®ãããMSBuildãããã¯ãè¿œå ãããŸããã
<msbuild> <description>PVS-Studio 2015</description> <workingDirectory>&PROJECT_ROOT;...</workingDirectory> <projectFile>...\PVS-Studio-vs2015.sln</projectFile> <buildArgs>/p:Configuration=Release</buildArgs> <targets>Build</targets> <timeout>600</timeout> <executable>&MSBUILD14_PATH;</executable> </msbuild>
ãããŠããããã¯ã¯äžè¬çãªã¿ã¹ã¯ã®ããã«åããããŸããïŒ
<exec> <description>PVS-Studio 2015 sign</description> <executable>&PROJECT_ROOT;...\SignToolWrapper.exe</executable> <baseDirectory>&PROJECT_ROOT;...</baseDirectory> <buildArgs>"&SIGNTOOL;" ... \PVS-Studio-vs2015.dll"</buildArgs> <buildTimeoutSeconds>600</buildTimeoutSeconds> </exec>
ãã®ãããªãããžã§ã¯ããã¡ã€ã«ã«åºã¥ããŠãCCNetã¯å®è¡ããããã¹ãŠã®æé ã䟿å©ã«è¡šç€ºããŸãïŒãã ãããã¹ã¯ããããã¬ã€ãŠãŒãã£ãªãã£ã§ã®ã¿ãäœããã®çç±ã§ãWebã€ã³ã¿ãŒãã§ã€ã¹ã¯ããããµããŒãããŸããã§ããïŒã Jenkinsã§ã¯ãçµ±åãããžã§ã¯ãã®æ®µéããé«ã¬ãã«ãã«è¡šç€ºãããããããããåãå¿ èŠããããŸããããåŸã§èª¬æããŸãã
Jenkinsã®å ŽåããµãŒããŒæ§æãäžéšã®ãã©ã°ã€ã³ã®æ§æãã¡ã€ã«ãåãããžã§ã¯ãã«ã¯ç¬èªã®æ§æãã¡ã€ã«ããããŸãã ãããã®ãã¡ã€ã«ã¯ãã¹ãŠxml圢åŒã§æå®ãããŠããŸãããïŒå°ãªããšãCCNetãšæ¯èŒããŠïŒè¡šç€ºããã³ç·šéã«ã¯ããŸã䟿å©ã§ã¯ãããŸããã ã¿ã°å ã®ãã¹ãŠã®ã³ãã³ãã¯ãœãªããããã¹ãã§æžãããŠããŸãã 確ãã«ãããã¯äž»ã«ããŒã«ã䜿çšããã€ããªãã®ãŒã«ãããã®ã§ãã CCNetã§ã¯ãæ§æã¯æåã§æžã蟌ãŸããããããçŸããããã©ãŒãããã§ããŸãã ãã ããJenkinsã§ã¯ãWebã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããŠãããžã§ã¯ãèšå®ãç·šéããæ§æãèªåçã«çæããŸãã
ããã¯ãJenkinsæ§æã®ã³ãã³ããã©ã®ããã«èŠãããã§ãïŒ
<hudson.tasks.BatchFile> <command>CD "%BUILD_FOLDERS%\Builder"
 PVS-Studio_setup.exe /VERYSILENT /SUPPRESSMSGBOXES ...
 Publisher_setup.exe /VERYSILENT /SUPPRESSMSGBOXES</command> </hudson.tasks.BatchFile>
ãããŠãããã¯éåžžã«å°ããªäŸã§ãã
ã¿ã¹ã¯ã®ã¹ããŒã¿ã¹ã衚瀺ãã
åã«æžããããã«ãCCNetã§ã¯ããããžã§ã¯ãã«ã¿ã¹ã¯ãããã¯ãå ¥åãããŸãã ããã¯ãæ£åžžã«å®äºããã¿ã¹ã¯ã衚瀺ãããã¹ãããã®ããã§ãïŒå³2ïŒã
å³2-CCTrayã§ã®ã¿ã¹ã¯ã¹ããŒã¿ã¹ã®è¡šç€ºïŒCCNetã®ãã¹ã¯ãããã¯ã©ã€ã¢ã³ãïŒ
ãããã¯ã®ããããã®ãšã©ãŒã¯ããµãã¿ã¹ã¯ã®éå±€ã«ã¯ã£ãããšè¡šç€ºãããŸãã ããã¯ãçµ±åããã»ã¹ã®éåžžã«äŸ¿å©ã§èŠèŠçãªèŠèŠåã§ãã ã¿ã¹ã¯ã®èª¬æã«ããã°ããã°ãæ¢ãå¿ èŠã¯ã»ãšãã©ãããŸããã§ãããããŒã«ã«ã³ã³ãã¥ãŒã¿ãŒã§ç¢ºèªãã䟡å€ãããããšãããã«ããããŸããã Jenkinsã§ã¯ããã®åœ¢åŒã§çŽæ¥äœãèŠã€ãããŸããã§ããããããã£ãŠãæ°ãããµãŒããŒã«ç§»åããåã«ããã®ç¬éã詳现ã«èª¿æ»ããå¿ èŠããããŸããã
CCNetãšJenkinsã®é¡äŒŒç¹ãæãããšãã§ããŸããCCNetã«ã¯ãããžã§ã¯ããããããã®ãããžã§ã¯ãã®ã¹ãããã¯ã¿ã¹ã¯ã§ãïŒäžã®å³ãåç §ïŒã Jenkinsã«ããããžã§ã¯ãïŒãžã§ãïŒãããããã®æé ã¯æé ã§ãïŒå³3ïŒã
å³3-CCNetãšJenkinsã§ã®ãããžã§ã¯ãã®åœåã®å¯Ÿå¿
æ®å¿µãªãããJenkinsã®ãŠã§ãã€ã³ã¿ãŒãã§ãŒã¹ã§ã¯åã ã®ã¹ãããã®åäœãèŠèŠåããããšã¯ã§ããŸããããžã§ãã«ã¯ããã¹ãŠã®ã¹ãããããŸãšããå®å šãªã³ã³ãœãŒã«ãã°ãããããŸããã ããã§ã®å€§ããªäžäŸ¿ã¯ãã©ã®ã¹ãããã倱æããããJenkinsããèŠãããšãã§ããªãããšã§ããå®å šãªãžã§ãã¢ã»ã³ããªãã°ã確èªããå¿ èŠããããŸãã ãããŠãããªãã¯ããã«è¯ãããšã«æ £ããã®ã§ãå€ããŠãŒã¹ã±ãŒã¹ãæåŠããããããŸããã§ããã ããããMultijobãã©ã°ã€ã³ãå©ãã«ãªããŸãã ã
ãã®ãã©ã°ã€ã³ã«ããã次ã®é©æ°ãè¡ãããšãã§ããŸããã
1.ä»ã®ãžã§ãã®ã¹ããããšããŠãžã§ãã䜿çšããã ãããã£ãŠããŠãããŒãµã«ãžã§ããç»å ŽããŸãããããã«ãããç¹å®ã®ãµãã¿ã¹ã¯ã®ãã°ãåé¢ããæãéèŠãªããšãšããŠãç¹å®ã®ãµãã¿ã¹ã¯ã®ã¹ããŒã¿ã¹ãåå¥ã«è¡šç€ºã§ããŸããã Jenkins Webã€ã³ã¿ãŒãã§ãŒã¹ã¯ããã«ããžã§ãå ã®åã ã®ãžã§ãã®å®è¡ãèŠèŠåã§ããŸã-ãŸãã«ç§ãã¡ãæ¢ããŠãããã®ã§ãã å³4ã¯ãå®æãããã«ããžã§ãã®äŸã瀺ããŠããŸãã
å³4-å®äºããMultijob'aã®è¡šç€º
2.ãŠãããŒãµã«ãžã§ãã䜿çšãããšãéè€ããã³ãŒããåãé€ãããšãã§ããŸããã ããšãã°ãé åžãããããã¹ãã®å®è¡ãã³ãŒãåæã®éå§ãªã©ãããã€ãã®ãŠãŒãã£ãªãã£ã®ã³ã³ãã€ã«ããããŸãã CCNetã§ã¯ããããã¯3ã€ã®ç°ãªããããžã§ã¯ãã®åãã¿ã¹ã¯ãããã¯ã§ããã Jenkinsã«ã¯ããã®ãŠãŒãã£ãªãã£ãã³ã³ãã€ã«ããããã®Jobããããè€æ°ã®Multijobã§äœ¿çšãããŠããŸãã
3. Jenkinsã§ãããžã§ã¯ããäœæããå Žåã次ã®ã€ããªãã®ãŒã䜿çšãããŸãã ãã«ããžã§ãããããžã§ã¯ããããã³ãŠãããŒãµã«ãã¹ããããã§å ±æãããã¹ãŠã®ãžã§ãã ãŠãããŒãµã«ãžã§ãã®ååã«ã¯æ¥é èŸãjob_ããä»ããŠãããç¬ç«ãããããžã§ã¯ããšããŠã®äœ¿çšãæå³ãããã®ã§ã¯ãããŸããã ãŸãããªããžããªãããœãŒã¹ã³ãŒããããŠã³ããŒãããããšãå«ãŸããŠããŸããã ãã«ããžã§ãåã«ã¯ãproj_ããšããæ¥é èŸãä»ããŠããããœãŒã¹ã³ãŒãã®èªã¿èŸŒã¿ãããã³ä»ã®ãžã§ãã®èµ·åã®ã¿ãå«ãŸããŸãã ïŒèŠèŠåãããŠããªããããåé¿ããããšããã¹ãããïŒã
ãŠãããŒãµã«ãžã§ãã¯ã次ã®ãã©ã¡ãŒã¿ãŒã§èµ·åãããŸãã
WORKSPACE=$WORKSPACE
ããã¯ããžã§ãããã«ããžã§ãã®äœæ¥ãã£ã¬ã¯ããªã§èµ·åãããããšãæå³ããŸãã
ãããã£ãŠããœãŒã¹ãã¡ã€ã«ã®æŽæ°ãã°ãšã¢ã»ã³ããªã®ãã¹ãŠã®æ®µéã®ãã°ãå¥ã ã«ååŸããããšãã§ããŸãã ãã¹ãŠã®ãããžã§ã¯ãã§ãã®ã€ããªãã®ãŒã«åŸãããšã¯é£ãããç¡æå³ã§ãã ããã¯ãåé¡ãçºçããå Žåã«è©³çŽ°ã«èª¿æ»ããå¿ èŠãããããã€ãã®æ倧ãã€æãéèŠãªãããžã§ã¯ãã«å¯ŸããŠã®ã¿è¡ãããŸãã
4.ãã«ããžã§ãã§ã¯ããžã§ãã®æ¡ä»¶ä»ãããã³äžŠåå®è¡ãæ§æã§ããŸãã ãã«ããžã§ãã¯ãåãã«ãŒã«ã«åŸã£ãŠãã«ããžã§ããå®è¡ã§ããŸãã ãããã£ãŠããããžã§ã¯ãã®èµ·åãçµã¿åãããããšãã§ããŸããããšãã°ããã¹ãŠã®ã€ã³ã¹ããŒã©ãŒãŸãã¯ãã¹ãŠã®ãã¹ãã®ã¢ã»ã³ããªãå®è¡ããŸãã
ãã«ããã°ã衚瀺ãã
CCNetã§ã¯ããããžã§ã¯ãã®ãã«ããã°ã衚瀺ããã®ã¯éåžžã«äžäŸ¿ã§ããã ãµãŒããŒã®åºåãšæ··åããç¹å¥ãªããŒã¯ã¢ããããããŸããã Jenkinsã«ã¯ãã®ãããªåé¡ã¯ãããŸãããããã«ãäžéšã®ãããžã§ã¯ãã§ã¯ãµãã¿ã¹ã¯ã®ãã°ãåå²ããããšãå¯èœã«ãªããŸããã
ãœãŒã¹ã³ãŒããªããžã§ã³ã®ååŸ
Jenkinsã¯ãSVNãªããžããªã«è¿œå ãããåãªã³ã¯ã®ãªããžã§ã³ããŒãžã§ã³ãå®çŸ©ããŸãã ã€ãŸã è€æ°ã®ãã£ã¬ã¯ããªãè¿œå ããå Žåãçªå·ã¯å€§ããç°ãªãå¯èœæ§ããããŸãããæ倧æ°ã1ã€å¿ èŠã§ãã
ããã¥ã¡ã³ãã«åŸã£ãŠãããã次ã®ããã«æäœããŸãã
è€æ°ã®ã¢ãžã¥ãŒã«ããã§ãã¯ã¢ãŠãããŠããå Žåã¯ãsvnversionã³ãã³ãã䜿çšããŸãã è€æ°ã®ã¢ãžã¥ãŒã«ããã§ãã¯ã¢ãŠãããŠããå Žåã¯ãsvnversionã³ãã³ãã䜿çšããŠãªããžã§ã³æ å ±ãååŸããããSVN_REVISION_ <n>ç°å¢å€æ°ã䜿çšã§ããŸãã<n>ã¯èšå®ãããå Žæã«äžèŽãã1ããå§ãŸãã€ã³ããã¯ã¹ã§ãã
ãããŠã圌ãã¯ãããè¡ããŸããããã¹ãŠã®èšå®å€SVN_REVISION_ <n>ããæ倧å€ãååŸãããã¢ã»ã³ãã«ãããããã°ã©ã ã«è¿œå ãããŸãã
Jenkinsã®äŸ¿å©ãªãã©ã°ã€ã³
ãã©ã°ã€ã³ã䜿çšããŠæ©èœãæ¡åŒµãããšããµãŒããŒãã§ããã ãæè»ã«æ§æã§ããŸãã Visual Studioã§ãã¹ããå®è¡ããããã®ãã©ã°ã€ã³ã¯ããããã䜿çšãæåŠããå¯äžã®ãã©ã°ã€ã³ã§ãã ãããã«ã¯ã䜿çšããªãå¿ é ã®èµ·åãã©ã¡ãŒã¿ãŒãè¿œå ãããŠãããããã³ãã³ãã©ã€ã³ãããã¹ããå®è¡ããã ãã§ããŠãããŒãµã«ãžã§ããäœæããæ¹ãç°¡åã§ããã æ®å¿µãªãããç®±ããåºããŠããã«ããžã§ã³ãã³ã¹ã¯ç§ãã¡ãCCNetã§æ £ããŠãããã®ã®å€ããç¥ããŸããã§ããã ãããããã©ã°ã€ã³ã®å©ããåããŠãå¿ èŠãªãã¹ãŠã®æ©èœããæ»ããããšãã§ããŸããã
以äžã¯ã䜿çšããã®ã«äŸ¿å©ã§ãããšããã£ãç°¡åãªèª¬æä»ãã®ãã©ã°ã€ã³ã®ãªã¹ãã§ãã
- ãã«ããžã§ããã©ã°ã€ã³ -ä»ã®ãžã§ããã¢ã»ã³ããªã®æ®µéãšããŠäœ¿çšããŠãé 次ããã³äžŠåå®è¡ã®å¯èœæ§ãæãããããšãã§ããŸãã
- Environment Injectorãã©ã°ã€ã³ -ãã®ãã©ã°ã€ã³ã䜿çšãããšãã°ããŒãã«ãã¹ã¯ãŒããèšå®ã§ããŸãã ãããã¯ç°å¢å€æ°ãšããŠäœ¿çšãããŸããããã©ã°ã€ã³ã¯ãã®ãããªå€æ°ã®å€ããã°ã«é ããŸãã
- Pre SCM BuildStep Plugin-ããŒãžã§ã³ç®¡çã·ã¹ãã ã®ã³ãã³ããå®è¡ããåã«è¿œå ã®ã¹ããããè¿œå ããŸãã
- MSBuildãã©ã°ã€ã³ã¯ãMSBuildã䜿çšããŠãããžã§ã¯ããæ§ç¯ããããã®äŸ¿å©ãªãã©ã°ã€ã³ã§ãã èšå®ã§ã¯ãMSBuildã®ç°ãªãããŒãžã§ã³ãžã®ãã¹ãäžåºŠç€ºãããŸãã ããã«ãããžã§ã¯ãã§ã¯ãã¢ã»ã³ããªæé ãç°¡åã«è¿œå ã§ããŸãã
- ãã©ã¡ãŒã¿ãŒåãããããªã¬ãŒãã©ã°ã€ã³ -ãããžã§ã¯ãã®èµ·åãªãã·ã§ã³ãè¿œå ããŸãã ããšãã°ããã£ã¹ããªãã¥ãŒã·ã§ã³ãæ§ç¯ããããã®ãã©ã³ã¯/å®å®ãã©ã³ããéžæã§ããŸãã
- ãã«ãåŸã¹ã¯ãªãããã©ã°ã€ã³ -ã¢ã»ã³ããªåŸã«è¿œå ã®æé ãå®è¡ããŸãã
- Throttle Concurrent Buildsãã©ã°ã€ã³ -ãã®ãã©ã°ã€ã³ã䜿çšãããšããããžã§ã¯ãã®äžŠåãã«ãã®æ°ãã°ããŒãã«ã«ããŸãã¯ç¹å®ã®ã«ããŽãªå ã§èª¿æŽã§ããŸãã Jenkinsã®CCNetã®ãã¥ãŒã«äŒŒãæ©èœãååŸã§ããŸããç°ãªãã«ããŽãªïŒãã¥ãŒïŒã®è€æ°ã®ãããžã§ã¯ãã䞊è¡ããŠå®è¡ã§ããäžæ¹ã§ãåäžã®ãã¥ãŒå ã§ãããžã§ã¯ããé 次å®è¡ã§ããŸãã ããšãã°ãã€ã³ã¹ããŒã©ãŒïŒãã£ã¹ããªãã¥ãŒã·ã§ã³ïŒãšãã¹ãïŒãã¹ãïŒã®ãã¥ãŒããããŸãã ãã¹ãã®å®è¡äžã«ããçš®ã®é åžããããåéã§ããããã«ãããã®ã§ãããåæã«ãã¹ãã䞊è¡ããŠåäœããªãããã«ããå¿ èŠããããŸã-ãµãŒããŒäžã«ååãªã«ãŒãã«ããããŸããã
- Build Name Setter Plugin-å¿ èŠãªåœ¢åŒïŒ Major.Minor.Revision.BuildïŒã§ã¢ã»ã³ããªåãèšå®ã§ããŸãã
- ããã·ã¥ããŒããã¥ãŒ -ãã©ãŠã¶ã«ãžã§ãã®ç¬èªã®è¡šç€ºãè¿œå ã§ããŸãã ãªããªã æåã§å®è¡ããæå³ããªãæ±çšãžã§ããããããããã®ãã©ã°ã€ã³ã䜿çšããã«ãªã¹ããäœæããŸããã
- ZenTimestampãã©ã°ã€ã³ã¯ãã¿ã€ã ã¹ã¿ã³ããè¿œå ããŠãã°ãäœæãã䟿å©ãªãã©ã°ã€ã³ã§ãã
ãã¹ã¯ãããã¯ã©ã€ã¢ã³ãã®æŠèŠ
CCNetããéç¥ãåä¿¡ããããã«ãWindowsçšã¯ã©ã€ã¢ã³ã-CCTrayã䜿çšããŸããã
Jenkinsãæäœããããã®ããã€ãã®ãªãã·ã§ã³ã次ã«ç€ºããŸãã
1. CCTray-ãã®ããã°ã©ã ã¯ãJenkinsã®ãµãŒããŒã«ã䜿çšã§ããŸãã ãããžã§ã¯ãã¯ä»¥åãšã»ãŒåãã«ãªããŸãïŒå³5ïŒã
å³5-CCTrayã®ã¹ã¯ãªãŒã³ã·ã§ãã
Jenkinsã®é¡§å®¢ãšããŠã®èª¬æïŒ
- CCNetã®ããã«ã¯éçºãããŸããã
- ãµãã¿ã¹ã¯ã衚瀺ããæ¹æ³ãããããŸããïŒCCNetã§ã®ã¿æ©èœããŸãïŒã
- ãããžã§ã¯ãã®å®è¡æ¹æ³ãããããŸããã
- ååãã¯ãªãã¯ãããšããããžã§ã¯ãããŒãžã«ç§»åã§ããŸãã
- ãããžã§ã¯ãã®è¡šç€ºã¿ã€ãïŒã¢ã€ã³ã³ããªã¹ãã詳现ïŒã調æŽãããŸãã
- ãªãŒãã³ãœãŒã¹ã
2. CatLight ïŒå³6ïŒ
å³6-CatLightã®ã¹ã¯ãªãŒã³ã·ã§ãã
ã客æ§ã®èª¬æïŒ
- çŸæç¹ã§ã¯ãããŒã¿çãæçµçãæ¯æãããŸãã
- ã€ã³ã¿ãŒãã§ã€ã¹ã®ã€ã³ã¹ããŒã«ãæäœãã°ãªããäžã«ã¯ã©ãã·ã¥ãçºçããŸãã
- ã³ã³ãã¥ãŒã¿ãŒãäŒæ¢ç¶æ ãã解é€ããããšãããã·ã¥ããŒãäžã®ãããžã§ã¯ãã®ã¹ããŒã¿ã¹ã¯èªåçã«æŽæ°ãããŸããã
- ãã«ããžã§ãã®ãµãã¿ã¹ã¯ã衚瀺ããæ¹æ³ãããããŸããã
- ãããžã§ã¯ãã®å®è¡æ¹æ³ãããããŸããã
- ãããžã§ã¯ãã®è¡šç€ºã¿ã€ãã¯æ§æãããŠããŸããïŒå¯èœãªãã¥ãŒã¯å³6ã®ã¿ã§ãïŒã
- ååãã¯ãªãã¯ãããšããããžã§ã¯ãããŒãžã«ç§»åã§ããŸãã
- æåŸã®5ã€ã®éå§ã®ã¹ããŒã¿ã¹ã確èªããŠããããã«ã¢ã¯ã»ã¹ã§ããŸãã
- èµ·åãããããžã§ã¯ãã®é²è¡ç¶æ³ã確èªã§ããŸãã
- è€æ°ã®ãµãŒããŒãè¿œå ããå Žåã¯ãããã·ã¥ã§åºåã£ãŠãã ããã
- WindowsãLinuxãMacçšããããŸãã
3. å è€ ïŒå³7ïŒ
å³7-å è€ã®ã¹ã¯ãªãŒã³ã·ã§ãã
ã客æ§ã®èª¬æïŒ
- ãã«ããžã§ãã®ãµãã¿ã¹ã¯ã衚瀺ããæ¹æ³ãããããŸããã
- ãããžã§ã¯ããéå§ã§ããŸãã æ®å¿µãªããããã©ã¡ãŒã¿åãããèµ·åã䌎ããããžã§ã¯ãã¯ãµããŒããããŠããŸãã-ãã®ãããªãããžã§ã¯ããèµ·åããããšãããšãŠãŒãã£ãªãã£ãã¯ã©ãã·ã¥ããŸãã
- ç°ãªããµãŒããŒã®ãããžã§ã¯ãã¯1ã€ã®ãªã¹ãã«è¡šç€ºãããåºå¥ã§ããŸããïŒå¿ ããã䟿å©ã§ã¯ãããŸããïŒã
- ãããžã§ã¯ãã®è¡šç€ºã¿ã€ãïŒãªã¹ããã°ãªããïŒã調æŽãããŸãã
- ååãã¯ãªãã¯ãããšããããžã§ã¯ãããŒãžã«ç§»åã§ããŸãã
- ã¯ã©ã€ã¢ã³ãã§æåŸã®ãã°ãçŽæ¥è¡šç€ºã§ããŸãããçå¹ ã®ããã¹ãããªããããããã¯ããŸã䟿å©ã§ã¯ãããŸããã
- ãªãŒãã³ãœãŒã¹ã
- Windowsã®ã¿ã
4. CCMenuã¯ããªãŒãã³ãœãŒã¹ã®Macå°çšã¯ã©ã€ã¢ã³ãã§ãã ç§ãã¡ã«ãšã£ãŠã¯é¢ä¿ãããŸãããã誰ãã«ãšã£ãŠã¯äŸ¿å©ãããããŸããã
ãããã«
CIã®äœ¿çšã¯ããããããããžã§ã¯ãã§åœ¹ç«ã¡ãŸãã ãããè¡ãããã«ãçŽ æŽãããç¡æããŒã«JenkinsããããŸããããã¯ãèšäºã§èª¬æããã»ããä»ã®å€ãã®ç¡æããã³ææã®CIã§ãã éçºãããžã§ã¯ãã䜿çšããã®ã¯è¯ãããšã§ããJenkinsãšãã©ã°ã€ã³ã«ã€ããŠã¯ãå®æçã«å€ãã®æŽæ°ãå ¬éãããŸãã ããšãã°ããŸã ããŒã¿æ®µéã«ããæ°ããBlue Oceanãããžã§ã¯ããã¡ã€ã³ããŒãžã«ãããªã©ãæ°ãããœãªã¥ãŒã·ã§ã³ãç»å ŽããŠããŸãã
Jenkinsãããžã§ã¯ããç£èŠããã¯ã©ã€ã¢ã³ãã¯ãç§ãããŸãåã°ããŸããã§ããã å€ãã®æ©èœèŠæ±ãæ¬ èœããŠããŸãã ãããããã¹ã¯ãããã¯ã©ã€ã¢ã³ãã¯ç¹ã«éèŠããªããWebã€ã³ã¿ãŒãã§ã€ã¹ã®ã¿ã䜿çšããæ¹ãããé©åã§ãã
æ°ãããµãŒããŒã«ç§»åãããšããJenkinsãWindowsãµãŒãã¹ãšããŠäœ¿çšã§ããŸããã§ããããªããªãã ãã®ã¢ãŒãã§ã¯UIãã¹ãã¯å®è¡ãããŸããã é ããããŠã£ã³ããŠãæã€ã³ã³ãœãŒã«ã¢ããªã±ãŒã·ã§ã³ãšããŠèµ·åããããã«ãµãŒããŒãæ§æããããšã§ãç¶æ³ããæãåºããŸããã
æ瀺ãããè³æãžã®è¿œå ãŸãã¯ãããã®åé¡ã«å¯Ÿããèå³æ·±ã解決çãããå Žåã¯ãèšäºã«ã³ã¡ã³ããæ®ããããã£ãŒãããã¯ãã©ãŒã ãããé£çµ¡ãã ããã
è±èªã話ãèŽè¡ãšãã®èšäºãå ±æãããå Žåã¯ã翻蚳ãžã®ãªã³ã¯ã䜿çšããŠãã ããïŒSvyatoslav Razmyslovã CruiseControl.NETããPVS-StudioéçºããŒã ã®Jenkinsãžã®ç§»è¡
èšäºãèªãã§è³ªåããããŸããïŒ
å€ãã®å Žåãèšäºã«ã¯åã質åãå¯ããããŸãã ããã§åçãåéããŸããïŒ PVS-StudioããŒãžã§ã³2015ã«é¢ããèšäºã®èªè
ããã®è³ªåãžã®åç ã ãªã¹ããã芧ãã ããã