2020å¹´06æ22æ¥
Bitbucket Code Insights ã¯ãã³ã¼ãã¬ãã¥ã¼ã®è³ªã¨ã¹ãã¼ãã«è²¢ç®ãã¾ã奥æ å彦 Kazuhiko Okumura
ããã«ã¡ã¯
ä»æ¥ã¯ãã½ã¼ã¹ã³ã¼ãã®ãã¼ã¸ã§ã³ç®¡çãããã¦ããæ¹ã§ä»¥ä¸ã®ãããªèª²é¡ããæã¡ã®æ¹ã«ããç´¹ä»ãããæ©è½ãããã¾ãã
ãã®ãããªã³ã¼ãã¬ãã¥ã¼å¹çåãã³ã¼ãã®å質åä¸ã«èª²é¡ãæã£ã¦ããæ¹ã«ãè¦ããããã®ããã¢ãã©ã·ã¢ã³è£½åã®Gitãã¹ãã£ã³ã°ãã¼ã«ãBitbucket Serverãã® Bitbucket Code Insights(*1)ã§ãã
ã³ã¼ãã«å¯¾ããéç解æãã¦ããããã¹ãã¯ä¸è¬çã«CIãã¼ã«ãªã©ã§å®è¡ãã¾ãããBitbucket Code Insightsã§ã¯ãããã®å®è¡çµæã¬ãã¼ããBitbucketã«éä¿¡ãããã¨ã§ããã«ãªã¯ã¨ã¹ãã®ç»é¢ä¸ã«ãããã®ã¬ãã¼ãã表示ããæ©è½ã§ãã
(*1: ãã®ããã°ã¯Serverçã®Bitbucketãç¨ãã¦ãç´¹ä»ãã¦ãã¾ããAtlassian Cloudã®Bitbucketã«ãCode Insightsã¯ããã¾ãããé£æºã§ãããã¼ã«ã使ãæ¹ãªã©ã¯ç°ãªãå ´åãããã¾ãããã®ç¹ããçæé ããèªã¿ä¸ããã)
Bitbucket Code Insights ã®ã¡ãªããã¯ããã¡ãã®Atlassian Blog ã§ç´¹ä»ããã¦ããæç« ãæåãã¦è¦ç´ãã¾ãã¨æ¬¡ã®ãããªãã®ãããã¾ãã
ã§ã¯ãå®éã«ãªãã¯ã½ãããåãæ±ã£ã¦ããOSSã©ã¤ãã©ãªã®èå¼±æ§è¨ºæãã¼ã« WhiteSource ãå©ç¨ãã¦ãBitbucket Code Insights ã®ä½¿ãæ¹ãè¦ã¦ããã¾ãããã
å ã«Code Insightsã§WhiteSourceã®ã¬ãã¼ããåå¾ããä»çµã¿ã説æããã¦ãã ããã
WhiteSourceã«ããæ¤æ»ã¯é常ãCIãã¼ã«ã§å®è¡ãã¾ããCIãã¼ã«ã®ã¸ã§ãã¿ã¹ã¯ã§ã¯ãã¯ãã¼ã³ãããªãã¸ããªããOSSã©ã¤ãã©ãªã®æ å ±ãã¹ãã£ã³ãã¦ããã®æ å ±ãSaaSã®WhiteSourceã¯ã©ã¦ãã«éä¿¡ãã¦ãã¹ãã£ã³æ å ±ããèå¼±æ§ã診æãã¾ãã
ã§ããããã®ä»çµã¿ã§ãã¨WhiteSourceã®å ´åã¯CIãã¼ã«ããBitbucketã«åãã診æçµæã¬ãã¼ããéä¿¡ãããã¨ãã§ãã¾ãããããã§ç»å ´ããã®ããWhiteSource for Bitbucket Server(*2) ã§ãã
WhiteSource for Bitbucket Server ã¯ãWhiteSource for Developers(*3) ã«å«ã¾ããéçºãã¼ã«ã®1ã¤ã§ãã
(*2: WhiteSource for Bitbucket Server ã¯ååã示ãéããBitbucket Serverå°ç¨ã®ãããAtlassian Cloudã«ã¯å¯¾å¿ãã¦ãã¾ããã)
(*3: Bitbucket Code Insightsãå©ç¨ããã«ã¯ãWhiteSource for Developersãï¼ãªãã·ã§ã³ï¼ã®ã©ã¤ã»ã³ã¹ãå¿
è¦ã§ãã)
ããã¯Bitbucket Serverã¨ç´æ¥éä¿¡ããã¨ã¼ã¸ã§ã³ãã¢ããªã±ã¼ã·ã§ã³ãæ§ç¯ãããã¨ã§æ¬¡ã®ãããªä»çµã¿ã§ãCIãã¼ã«ãä»ããã«ãªãã¸ããªã®OSSã©ã¤ãã©ãªãæ¤æ»ãã¾ãã
WhiteSource for Bitbucket Serverã¯ãDockerãã¡ã¤ã«ã§æä¾ããã¾ãã
æ¨æºè¨å®ã§ä½¿ãå ´åã«ã¯ãæä¾ãããdockerfileã使ã£ã¦ãDockerã¤ã¡ã¼ã¸ä½æããDockerã³ã³ããã®ç«ã¡ä¸ããã¦èµ·åãããã¨ã§å©ç¨ã§ãã¾ãã
åæè¨å®ã¨ãã¦WhiteSourceã§ã¹ãã£ã³ãè¡ããªãã¸ããªãé¸æãã¾ãã
é¸æãããªãã¸ããªã«å¯¾ãã¦ãWhiteSource for Bitbucket Serverããåæè¨å®ã®ããã®ãã«ãªã¯ã¨ã¹ããç³è«ããã¾ãã®ã§ãæ¿èªãã¦masterãã©ã³ãã«ãã¼ã¸ãã¾ãã
ãã¼ã¸ãå®äºããã¨ããªãã¸ããªã®ãã¡ã¤ã«ä¸è¦§ç»é¢ã«ç´è¿ã®æ¤æ»çµæã®ãµããªã表示ãããããã«ãªãã¾ãã
ãã¨ã¯ãã¤ãéãããã¼ã«ã«ã§ä¿®æ£ãããã©ã³ãããªã¢ã¼ããªãã¸ããªã«ããã·ã¥ããã¨ãèªåçã«OSSã®èå¼±æ§æ¤æ»ãå®è¡ãã¾ãã
ãã®æ¤æ»ã¯Bitbucketä¸ã§ã¯ããã«ããã¨ãã¦æ±ãããã³ããããã¨ã«çµæã¬ãã¼ããé²è¦§ãããã¨ãã§ãã¾ãã
ããã¦ããã«ãªã¯ã¨ã¹ããè¡ãã¨è©²å½ããã³ãããã«ç´ã¥ãæ¤æ»ã¬ãã¼ããCode Insightsã¬ãã¼ãã¨ãã¦ç¢ºèªãããã¨ãã§ãã¾ãã
ç»é¢ã§ã¯å³ä¸ã®æ¹ã®"WhiteSource Security"ãã¯ãªãã¯ãããã¨ã§ãå質ã¬ãã¼ãã表示ãã¾ãã
ä¾ãã°ç»é¢ã®ä¾ã§ãã¨ãå©ç¨ãã¦ããOSSã©ã¤ãã©ãªã«èå¼±æ§ãçºè¦ããã¦ããã失æãã¨è¡¨ç¤ºããã¦ãã¾ãã
ãã®ããã«ãã¦ããã«ãªã¯ã¨ã¹ãã§ã³ã¼ãã¬ãã¥ã¼ãè¡ãåã«ãéç解æçµæãä¸éã確èªãããã¨ãã§ãã¾ãã
ãã®ããã«Code Insightsã®å質ã¬ãã¼ãã使ããã¨ã§ãã³ã¼ãã¬ãã¥ã¼ã®æéãæå¹çã«å©ç¨ã§ãããã¨ããåããããã ãã¾ãã§ããããï¼
ä»åã¯ãWhiteSourceãç¨ããOSSã©ã¤ãã©ãªã®èå¼±æ§æ¤æ»ã®çµæãåºåãã¾ããããå質ã¬ãã¼ãã«ã¯ãã®ä»ã«ããSonarQubeãSnykãããCode Insightsã«å¯¾å¿ããã¢ããªãå ¬éããã¦ãã¾ãã
ã¾ããAtlassianã®CI/CDãã¼ã«ã§ããBambooã«ã¯ãBuild warnings parser task ããããããã¯ãã«ãçµæãã°ããè¦åãã¨ã©ã¼ãåå¾ãã¦ãBitbucketã«çµæã¬ãã¼ããåºåãããã¨ãã§ããã®ã§ãä¾ãã°JUnitãªã©ã®èªåãã¹ããã¬ã¼ã ã¯ã¼ã¯ã®å®è¡æã«ã¨ã©ã¼ãåºãã°ãã®çµæãBitbucket Code Insightsã«ãåºåã§ãã¾ãã
Bitbucket Code Insightsã¯APIãå ¬éããã¦ããã¬ãã¼ããJSONå½¢å¼ã¨ãªãã®ã§ãã使ãã®éç解æãã¼ã«ãã¦ããããã¹ããã¼ã«ã«å¯¾å¿ããå質ã¬ãã¼ããã«ã¹ã¿ãã¤ãºãã¦ãCode Insightsã§è¡¨ç¤ºããããã¨ãã§ãã¾ãã
Bitbucket Code Insightsã¯ãã³ã¼ã解æçµæãã¬ãã¼ãã£ã³ã°ãããã¨ã§ãPRã«ãããã³ã¼ãã¬ãã¥ã¼ã®ããã«ããã¯ãæ¹åããã³ã¼ãã®å質ãä¿ã¡ãªãããªãªã¼ã¹ã¹ãã¼ããä¸ãããã¨ã«è²¢ç®ãã¾ããã³ã¼ãã®å質管çã«èå³ãæã£ã¦é ãããªããBitbucket Serverããã²ãå©ç¨ãã¦ã¿ã¦ãã ããã
æ¬æ
å ±ã¯ããã°ãå
¬éããæç¹ã®æ
å ±ã¨ãªãã¾ããæ¬æ
å ±ã«è¨è¼ãã製åããµã¼ãã¹ã«ã¤ãã¦ä»æ§ãæä¾æ¹æ³ãªã©ãå¤æ´ã«ãªãå ´åãããã¾ãã
æ¬æ
å ±ã«è¨è¼ããä¼ç¤¾åã»è£½ååã»ãµã¼ãã¹åã¯ãå社ã®åæ¨ã¾ãã¯ç»é²åæ¨ã§ãã
ãä¸æãªç¹ã¯ãåãåãããã ããã
ãåãåãã ãã ãã ãã
ã¢ãã©ã·ã¢ã³ç¤¾ã§ã¯ãµãã¼ãç¯å²å¤ã¨ãªã£ã¦ãããµã¼ããã¼ãã£è£½ã®ã¢ããªã³ããªãã¯ã½ããã®ãµãã¼ãã§ã¯ãµãã¼ããã¾ãã
ãªãã¯ã½ããã®ãµãã¼ãã¯éçºå ãæä¾ãããµãã¼ã以ä¸ã®ä¾¡å¤ãããã¾ãã
ãã¼ã«ãå°å ¥ããã ãã§ã¯æåã¨ã¯ããã¾ãããå©ç¨è ãå¹æãæãã¦ããã ããã¨ã大åã§ããç¬èªã§å¶ä½ããå種ã¬ã¤ãããã¯ã¯ãã¼ã«æ´»ç¨ãä¿é²ãã¾ãã
ãªãã¯ã½ããããã©ã¤ã»ã³ã¹è³¼å ¥ãé ããã客æ§ã«ã¯ã¬ã¤ãããã¯ãç¡æé²åãããã¾ãã
ãã¼ã«æä½ã®ç ä¿®ã ãã§ãªããã¦ã©ã¼ã¿ãã©ã¼ã«åéçºããã¢ã¸ã£ã¤ã«åéçºãã®ã·ãã¥ã¬ã¼ã·ã§ã³ç ä¿®ãæä¾ã
æ¥æ¬éä¸ã®çç£æ§åä¸ã«ãå¹æã®ããç ä¿®ãµã¼ãã¹ã§ãã
ãªãã¯ã½ããããã©ã¤ã»ã³ã¹è³¼å ¥ãé ããã客æ§ã«ã¯ç¡ææå¾ ãå²å¼ç¹å ¸ããããã¾ãã