ãããããCI/CDãå°å ¥ããæ¹ã«ãããã§ã«æ´»ç¨ããã¦ããæ¹ã«ããCircleCIãéãã¦CI/CDã«å¯¾ããç解ãæ·±ãããæä¼ããã§ããã°å¹¸ãã§ãã
- ååã®è¨äºï¼ãCI/CDã®ã¨ãã¹ãã¼ãã解説ï¼CI/CDã¨ã¯ä½ãï¼ ãªãä»ãå¿ è¦ã¨ãããã®ãï¼ã
対象èªè
- ååã®è¨äºãèªãã§CI/CDã«èå³ãæãããæ¹
- CI/CDã«ã¤ãã¦å¦ã³ããæ¹
- CircleCIã使ã£ã¦ã¿ããæ¹
- CircleCI Ver. 2.1ã«ã¤ãã¦ç¥ãããæ¹
å¿ è¦ãªç°å¢ï¼ç¥è
- GitHubã®ã¢ã«ã¦ã³ã
- ã½ããã¦ã§ã¢ã®ãã¹ãã«ã¤ãã¦ã®ä¸è¬çç¥è
- ã¢ã¸ã£ã¤ã«éçºã«ã¤ãã¦ã®ä¸è¬ç¥è
çè ã«ã¤ãã¦
ãCircleCIã®å éçºè ã§ãç¾å¨ã¯CircleCIåã®æµ·å¤æ¯ç¤¾ã§ããCircleCI Japanã§ãã¾ãã¾ãªæ´»åãè¡ã£ã¦ãã¾ãã
CircleCIã«ã¤ãã¦
ãCircleCIã¯æ°ããCI/CDãµã¼ãã¹ã®ä¸ã§ä»£è¡¨çãªãµã¼ãã¹ã®ä¸ã¤ã§ããCI/CDã«ã¯ä¸»ã«èªåãã¡ã§ç®¡çãããã¹ãã£ã³ã°åã¨ãµã¼ãã¹å´ãéç¨ããã¯ã©ã¦ãåãããã®ã§ãããCircleCIã¯ãã®ä¸¡æ¹ãæä¾ãã¦ãã¾ããä»åã¯ã¯ã©ã¦ãåã使ã£ã¦è§£èª¬ãã¦ããã¾ãã
CircleCIã®ç¹å¾´ã¨ã¡ãªãã
ãããããCI/CDãµã¼ãã¹ãããä¸ã§CircleCIãé¸ã¶çç±ã¯ãªãã§ããããï¼ çè ã®æè¦ã§ã¯CircleCIã«ã¯ä»¥ä¸ã®ãããªã¡ãªãããããã¨æã£ã¦ãã¾ãã
- ã¢ãã³ãªCI/CDã®æ©è½ã®å¤ãããµãã¼ããã¦ãã
- ä»å¾æ¥æ¬èªã§ã®ãµãã¼ããæ å ±ãæå¾ ã§ãã
ãCircleCIã¯2018å¹´9æãæã£ã¦å¤ãè¨å®ã®ãµãã¼ããçµäºãã¾ãããæ°ããè¨å®ã¯CircleCI 2.0ï¼ä»¥ä¸ã2.0ï¼ã¨å¼ã°ããè¨å®æ¹æ³ã ãã§ã¯ãªãã¢ã¼ããã¯ãã£ãä¸æ°ããã¦ãã¾ãã主ã«ä»¥ä¸ã®ãããªç¹å¾´ãããã¾ãã
- æè»ãã¤æ示çãªãã«ãã®è¨å®ï¼è¿å¹´ã®ã½ããã¦ã§ã¢éçºã§ã¯ãã¾ãã¾ãªãã¼ã«ãéçºææ³ã使ãããããã«ãªããCI/CDãµã¼ãã¹ã«ã¯ãããã«æè»ã«å¯¾å¿ãããã¨ãæ±ãããã¦ãã¾ãã2.0ã¯ã¦ã¼ã¶ã¼ãè¨å®ãæ示çã«æ¸ããã¨ã§ãCI/CDã®è¨å®ãèªç±ã«ã«ã¹ã¿ãã¤ãºã§ããããã«ãªãã¾ããã
- Dockerã®ãµãã¼ãï¼Dockerã¯éçºç¾å ´ã§æ¥éã«åºã¾ã£ã¦ãã¾ãããCI/CDã®ä¸çãä¾å¤ã§ã¯ããã¾ããã2.0ã§ã¯Dockerã®ãã¤ãã£ã対å¿ã§éçºç°å¢ãæ¬çªç°å¢ã§ä½¿ã£ã¦ããåãDockerã®ã¤ã¡ã¼ã¸ã使ã£ã¦ãã«ããããã¨ãã§ãã¾ãã
- ã¯ã¼ã¯ããã¼ã®ãµãã¼ãï¼CI/CDã§ã§ãããã¨ï¼å¾è¿°ããã¸ã§ãï¼ã¯ã©ãã©ãå¢ãã¦ãã¾ãããããªãã¨ãã¸ã§ããçµã¿åããããå¶å¾¡ãããããããªã£ã¦ãã¾ããããããå¯è½ã«ããã®ã次åã§ç´¹ä»ããã¯ã¼ã¯ããã¼ã¨ããæ©è½ã§ããååã¯ãµã¼ãã¹ã«ããç°ãªãã¾ãããææ°ã®CI/CDãµã¼ãã¹ã«ã¯å¿ ãæ±ããããæ©è½ã®ä¸ã¤ã§ãã
ã以ä¸ãã¢ãã³ãªCI/CDã¨ããè¦ç¹ããè¦ãCircleCIã使ãã¡ãªããã§ããããã¦ãå¯æ¬¡çãªã¡ãªããã¨ãã¦ããããæ¥æ¬èªã§ã®æ å ±ãã©ãã©ãå¢ãããã¨ãæå¾ ããã¾ãã2018å¹´ã®æç¹ã§ã¯ä¸»è¦ãªCI/CDãµã¼ãã¹ã¯ãã¹ã¦è±èªåã®ãµã¼ãã¹ãªã®ã§ããµãã¼ããå ¬å¼ããã¥ã¡ã³ãã¯è±èªã§æä¾ããã¾ãã対ãã¦CircleCIã¯ã2018å¹´6æã«æ¥æ¬æ¯ç¤¾ã§ããCircleCI Japanãè¨ç«ããæ¥æ¬ã®ãã¼ã±ããã«å¯¾ãã¦ã³ããããã¦ãããã¨ãæ確ã«ãã¾ãããããããã¯æ¥æ¬èªã§ã®ãµãã¼ãã®éå§ãæ¥æ¬ã®ã¦ã¼ã¶ã«ããã³ãã¥ããã£ã§ç¥è¦ãªã©ãã©ãã©ãå ±æããããã¨ãæå¾ ããã¾ãã
CircleCIã使ã£ãéçºããã¼
ãå ·ä½çãªè¨å®ã®è§£èª¬ã«å ¥ãåã«ãCircleCIãã©ã®ããã«éçºããã¼ã®ä¸ã§ä½¿ãããã説æãã¾ãã
ãã»ã¨ãã©ã®CI/CDãµã¼ãã¹ããã¼ã«ã¯GitHubã®ãããªVCSã¨é£æºãã¦åãã¾ããéçºè ãæ°ããå¤æ´ãVCSã«Pushããã¨Webhookã«ããCircleCIã¸éç¥ãéãããCircleCIã¯ãã®å¤æ´ã®ãªãã¸ã§ã³ã使ã£ã¦ãã«ããéå§ãã¾ãããããã«ãã失æããå ´åãéçºè ã¯æåããã¾ã§ä¿®æ£ãã¾ãããã«ããæåããã°ãéçºè ã¯masterãã©ã³ãã«ãã¼ã¸ãã¦ããä¸åº¦ããã§ãã«ããå®è¡ããã¾ãããã®å¾ã¯ãã¼ã ãéçºä½å¶ã«ãã£ã¦ç°ãªãã¾ãããåºæ¬çã«ã¯2éãããã¾ãã
- masterãã©ã³ãã§ãã«ããæåãããCI/CDã®1ãµã¤ã¯ã«ã¯çµäº
- masterãã©ã³ãã§ãã«ããæåãããæ¬çªã»ã¹ãã¼ã¸ã³ã°ç°å¢ãªã©ã«èªåãããã¤
ãååã§ã解説ãã¾ããããèªåãããã¤ã¾ã§ã§ããã°ãã¾ãã¾ãªã¡ãªãããããã¾ããããããã¤ç°å¢ããã¡ãã¨å¯¾å¿ãããå¿ è¦ãããã®ã§ãã¼ãã«ã¯ä½ãã¯ããã¾ãããä»åã¯åºæ¬çã«masterãã©ã³ãã§ãã«ããæåããã°1ãµã¤ã¯ã«çµäºã¨ããæ¹éã§è§£èª¬ãã¦ããã¾ãã
Hello World
ãããã§ã¯CircleCIãå®éã«ä½¿ã£ã¦ã¿ã¾ããããå ¥éã¨ãã¦Hello Worldã表示ãããã¨ããããå§ãããã¨ã¯ãCI/CDã§ãä¾å¤ã§ã¯ããã¾ããããªããæ¬è¨äºã§ã¯ãã¼ã¸æ°ã®é¢ä¿ã§CircleCIã®å ¬å¼ããã¥ã¡ã³ãã®åãåããªããé²ãã¦ããã¾ãã
ãCircleCIã使ãå§ããããã«ã¯ãã¾ãã¯ããã¸ã§ã¯ãã追å ããå¿ è¦ãããã¾ãã詳ãã説æã¯å ¬å¼ããã¥ã¡ã³ãã«ãããã¾ããã大ã¾ãã«ä»¥ä¸ã®ãããªæµãã«ãªãã¾ãã
- http://circleci.com/signup/ãããµã¤ã³ã¢ãããã¦GitHubãBitbucketãé¸æãã¾ãã
- ãµã¤ã³ã¢ãããå®äºããã¨ãã«ãããããã¸ã§ã¯ããé¸ã³ã¾ãã
- CircleCIãåè¨èªã«ãã£ã¦ããããã®ãã«ãã®è¨å®ã表示ãã¾ããä¸ããè¨å®ãæ¸ãæéãçããã®ã§CircleCIãåãã¦ä½¿ãæ¹ã¯åèã«ãã¦ãã ããã
- "Start Building"ã¨ãããã¿ã³ãæ¼ãã°ãã«ããéå§ãã¾ãã
ãåé¡ãªããã«ããå®è¡ãããã°ä»¥ä¸ã®ç»åã®ããã«è¡¨ç¤ºããã¾ãã