Jenkinsã䜿çšããŠããŸããïŒ æãå¯èœæ§ãé«ãã®ã¯ãããããã®ã¯ã©ã¹ã®ãããŸã§ã§æã人æ°ã®ãããããžã§ã¯ãã ããã§ãã ç§ã¯åžžã«éçºè ã®äžäººãšè©±ãããŠãããã€ãã®é£ãã質åãããããšã«èå³ããããŸããã ããã«ã¯ãéçºè ã ãã§ãªãããžã§ã³ãã³ã¹èªèº«ã®äœæè ã§ããå·å£èä»ãããŸãã
ãåãã®ããã«ãJenkinsã¯MITã©ã€ã»ã³ã¹ãæã€ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã§ãã ããæè¿ãFOSDEMäŒè°ãéå¬ãããŸãã-ããªãŒãœãããŠã§ã¢ã«æ§ããããäžçæ倧ã®äŒè°ã§ãã ç¡æã§ãªãŒãã³ãäžçäžã®äœå人ãã®ã¹ããŒã«ãŒãããŸãã ããã¯ãJenkinsã®äœæè ã§ãã£ãŠããããã§èª°ãšã§ãäŒããããšãæå³ããŸãã JUG.ruã°ã«ãŒãã®å人ãååã®å°ããªã°ã«ãŒããšäžç·ã«ãç§ãã¡ã¯ããã«çªç¶äžéžãããžã§ã³ãã³ã¹ã®äœæè ãšã®è¯ãã€ã³ã¿ãã¥ãŒãèšé²ããããšãã§ããŸããã
ãã®ãããåœç€Ÿã®ä»®æ³ã¹ã¿ãžãªã§ããKoske Kawaguchi ïŒèªå·±çŽ¹ä»ãšä»¥äžã§ãã¹ãŠã詳现ã«èª¬æããŸãïŒãJUG.ruã°ã«ãŒãã®Ruslan Akhmetzyanov ARG89 ãããã³CIANã® Kirill Tolkachev tolkkv ïŒç§ãã¡ã®åžžä»»ã¹ããŒã«ãŒãã°ã«GroovyãGradleãSpringãNetflixãã¯ãããžãŒã¹ã¿ãã¯ïŒãããªãŒãã£ã³ã°ããããã£ã¹ãããç¥ãããšãã§ããŸãã
ã«ã¹ã©ã³ïŒããã«ã¡ã¯ã ãŸããããªãèªèº«ãšãžã§ã³ãã³ã¹ã«ã€ããŠå°ãæããŠãã ããã
KosukeïŒç§ã®ååã¯Koskeã§ããäž»ã«Jenkinsã®äœæè
ããã³CloudBeesã®CTOãšããŠç¥ãããŠããŸãã Jenkinsã¯ãéçºè
ããœãããŠã§ã¢é
ä¿¡ããã»ã¹ã®ããŸããŸãªæ®µéãèªååããããŒã«ã§ãã ç§ã¯å人çã«ããžã§ã³ãã³ã¹ã䜿çšããŠãããã·ã¢ã®ããã°ã©ããŒãäœäººãç¥ã£ãŠããŸããä»ã®äººã«äŒããŠããããã§ãã
ããªã«ïŒç§ãèªå·±çŽ¹ä»ãããŸã-ç§ã¯éçºè
ã§ãããã¢ã¹ã¯ã¯ãžã§ã³ãã³ã¹ãšãªã¢ããŒãã¢ããïŒJAMïŒãéå¬ããŠããŸãã ç§ã¯Jenkinsãç¹ã«Scripted / Declarative Pipelineã䜿çšããçµéšãè±å¯ã§ãã JenkinsãéçºããŠããäŒç€Ÿã®CTOãäœãããŠããã®ãæããŠãã ããã
KoskeïŒç§ã®ããŒã ã®ä»äºã®1ã€ã¯ãã³ãã¥ããã£ãšããåãããããšã§ãã åœç€Ÿã®æåã¯ããªãŒãã³ãœãŒã¹ãããžã§ã¯ãã®æåã«å€§ããäŸåããŠããŸãã ãã1ã€ã®éèŠãªã¿ã¹ã¯ã¯ããªãŒãã³ãœãŒã¹ãã©ã®ããã«æ©èœãããã瀟å ã®äººã ã«æè²ããããšã§ãã äžè¬ã«ãäŒç€Ÿãšã³ãã¥ããã£ã®éã«ã¯éåžžã«èå³æ·±ãé¢ä¿ããããŸãã誰ãããäºãããäœããåŠã³ããã®çžäºäœçšã«å€ãã®æ³šæãæã£ãŠããŸãã
ãŸãããã¯ãã«ã«ãã£ã¬ã¯ã¿ãŒãå®è¡ããæ©èœãå°ããŸããã äºå®ã¯ãäŒç€Ÿãæé·ããã«ã€ããŠãã®æ©èœãé²åãããšããããšã§ãã æåã¯ãç§ã¯ãªãŒãããã°ã©ãã®ãããªãã®ã§ãå€ãã®æè¡çãªä»äºãããŸããã ããããäŒç€Ÿãçºå±ããã«ã€ããŠãä»ã®äººã ãåŸã ã«ãã®ä»äºãå§ããŸããã ããšãã°ãå¥ã®ããŒã ãPipelineã®åŠçãéå§ããŸããã 圌ããäœãããŠããã®ããç¥ãããã«å®æçã«é£çµ¡ãåããæã«ã¯ã¢ããã€ã¹ãããŸãã ãããã圌ãã¯èšèšãšéçºã«é¢é£ãããã¹ãŠã®æ±ºå®ãèªåã§è¡ããŸãã äžè¬ã«ãç§ã®åœ¹å²ã®ãã®é²åã¯éåžžã«èå³æ·±ããã®ã§ãããç§ã¯åžžã«é©å¿ããªããã°ãªããŸããã
ããªã«ïŒç§ãããªããæ£ããç解ããŠããã°ãããªãã®çŠç¹ã¯æè¡çãªåé¡ããã³ãã¥ããã£ãšã®å ±åäœæ¥ã«å€ãããŸãããïŒ
KosukeïŒã¯ããç§ãããŠããããšã®å€ãã¯ããã«é¢é£ããŠããŸãã äŒç€Ÿã®åµå§è ã ããèšããããšã¯ãããŸãã ãããã£ãŠãç§ã®æŽ»åã®äžéšã¯ãæ¯èŒçèšãã°ãæãæ¯ã£ãŠãã³ãŒã¹ã®å€æŽãå¿ èŠãªãšãã«ç¹å®ã®æ¹åã«ã³ãã¥ããã£ã奚å±ããããšã§ããããšãã°ãæšå¹Žã®ããã«ã ããã«ãç§ãã¡ãšããŒã ã¯ãžã§ã³ãã³ã¹ã®ãããã¬ã³ãã«åãçµãã§ããŸããç§ãã¡ã¯ç§ãã¡ã®ç®æšãäœã§ãããç§ãã¡ãå æããããšããŠããå°é£ã説æããŠããŸãã ããã«ãäžè¬çãªç¶æ³ã«ã€ããŠãã¬ãŒã³ããŒã·ã§ã³ãè¡ãå¿ èŠãããå Žåãç§ã¯èªä¿¡ãæ·±ããŸãã ãããç§ã®æŽ»åã®æŠèŠã§ãã
ããªã«ïŒãããŠãäœå¹Žåã«æè¡çãªä»äºããçµç¹çãªä»äºãžã®ç§»è¡ãå§ãŸã£ãã®ã§ããïŒ Jenkinsã®ã¹ããŒãªãŒãšããããžã§ã¯ãã®æé·ã«äŒŽã£ãŠããªãã®åœ¹å²ãã©ã®ããã«å€ãã£ãããæããŠãã ããã
KosukeïŒãã®ãããžã§ã¯ãã¯2004幎ã«ç»å Žããæåã¯å€æ¹ãšé±æ«ã«ä»äºãããŸãããã€ãŸããäžçš®ã®è¶£å³ã§ããã ãããããããžã§ã¯ãã¯åŸã ã«æé·ããŸããã ä»ã®äººãèªåã®ã¢ããªã±ãŒã·ã§ã³ãäœæã§ãããã®ãã©ãããã©ãŒã ãäœæããã®ã«ããªãã®æéãè²»ãããŸããã ãããŠããšã³ã·ã¹ãã ãšéçºè ã®ã³ââãã¥ããã£ãåºçŸããŸããããã®äžéšã¯ãã·ã¢ããã®ãã®ã§ãããããšãã°ããžã§ã³ãã³ã¹ã®äžã«éåžžã«èå³æ·±ããµãã·ã¹ãã ãæžãããªã¬ã°ã»ããã·ã§ãïŒTwitterïŒ @oleg_nenashev ïŒã§ãã ãããžã§ã¯ãã®äººæ°ãé«ãŸãã«ã€ããŠããŠãŒã¶ãŒãšã®ããè¯ã察話ãšãã¬ãŒãã³ã°ã®å¿ èŠæ§ãããæ·±å»ã«ãªããŸããã ãããã£ãŠãç§ã¯ãããã®ããšããã£ãšå§ããŸããã æåŸã«ã2010幎ããããžã§ã³ãã³ã¹ã¯éåžžã«äººæ°ãåããã®ã§ãç§ã¯ãã¹ãŠã®æéã圌ã«æ§ããŠäŒç€Ÿãèšç«ããããšã«ããŸããã ãã®ç¬éãããäŒç€Ÿã®çµç¹ã«é¢ããäœæ¥ãã³ãã¥ããã£ãšã®äœæ¥ã«è¿œå ãããŸããã äŒç€Ÿã¯æé·ããŠããã®ã§ãç§ã¯èªåèªèº«ã«è³ªåãå§ããŸãã-ç§ä»¥å€ã®èª°ãå®è¡ã§ããªã掻åã¯äœã§ããïŒ äŒç€Ÿã«ãã³ãã¥ããã£ã«ããè¿œå ã®è²¬ä»»ãåŒãåããŠåãã§ããæèœãªäººãããããããŸãã åŸã ã«ã圌ãã¯ç§ãèªåèªèº«ã§ããããšã®å€ãããå§ããŸããã æŠããŠãç§ãã¡ã®éã¯æ¬¡ã®ããã«èŠããŸããã
ããªã«ïŒããããšãã ä»æ¥ããžã§ã³ãã³ã¹ã¯æã人æ°ã®ããCIã·ã¹ãã ã§ãã ãããŠãJenkinsã®åçšããŒãžã§ã³ã¯ãä»ã®åçšCIã·ã¹ãã ãšæ¯èŒããŠã©ããããäžè¬çã§ããïŒ ããšãã°ãTravis Enterpriseã䜿çšããã®ããããŒã«ã«ã§åäœããã·ã¹ãã ã䜿çšããã®ã§ããïŒ
KosukeïŒãªãŒãã³ãœãŒã¹ã®Jenkinsã¯å€§ããªãããžã§ã¯ãã§ãããå€ãã®ãŠãŒã¶ãŒãããŸãã CloudBeesã®ã¹ã±ãŒã«ã¯ã¯ããã«å°ãããªã£ãŠããŸãã ãããã£ãŠãJenkinsãŠãŒã¶ãŒããŒã¹ã®1ïŒ ã§ãCloudBeesãŠãŒã¶ãŒã«å€æã§ããå Žåãããã¯éåžžã«å€§ããªçµæã«ãªããŸãã ãªãŒãã³ãœãŒã¹è£œåã«åºã¥ããã¹ãŠã®äŒæ¥ã¯ããã®ååã«åºã¥ããŠããŸãã ãã1ã€ã®éèŠãªè³ªåã¯ãåœç€Ÿã®è£œåã解決ãã¹ãåé¡ãæ±ãã人ã ãã©ã®çšåºŠæ¯æŽã§ãããã§ãã ãã¯ãã«ã«ãµããŒãã®æå¹æ§ãèšç®ããçµ±èšãæ£ããèŠããŠããã°ãäžè¬ã«ããµãŒãã¹ã¯ããããæºãããŸãã
ããªã«ïŒææçã䜿ã£ãŠãã人ã®ããšã§ããïŒ ãŸãã¯ãç¡æã®äººãããŸããïŒ
KosukeïŒäž¡æ¹ã ã€ãŸãã補åãè³Œå ¥ãããšãµããŒããæäŸãããŸãããç¬èªã®ãœãããŠã§ã¢ã䜿çšããã«å ¥æããããšãã§ããŸãã
ããªã«ïŒã€ãŸããããªãã¯éçºè ãšãŠãŒã¶ãŒããªãŒãã³ãœãŒã¹ãšã³ããŒã·ã£ã«ã®éã®ä»²ä»è ãšããŠè¡åããŠããŸãã 補åããžã§ã³ã®ã¿ã¹ã¯ãæã£ãŠããããšãæ£ããç解ããŠããŸããïŒ
KosukeïŒããã¯å®å šã«çå®ã§ã¯ãããŸãããå¥ã®è£œåããŒã ããããŸãã ç§ã¯ãŠãŒã¶ãŒã®ä»£è¡šã§ã¯ãããŸããããç§ã¯åžžã«å€ãã®äººã ããŠãŒã¶ãŒãšã®ããŒãã£ã³ã°ãè¡ã£ãŠããŸããã€ãŸããç§ã¯ã³ãã¥ããã£ãšé£çµ¡ãåãåã£ãŠããŸãã ããšãã°ãäŒç€Ÿã®ä»ã®åŸæ¥å¡çšã®ãSummary with advancedãåããããŸãã ãããã®æçš¿ã§ãç§ãã¡ã®ãŠãŒã¶ãŒããœãããŠã§ã¢ãæžãæ¹æ³ãšãããããžã§ã³ãã³ã¹ã«ãšã£ãŠäœãæå³ãããã«ã€ããŠè©±ããŸãã ã ããã補åããŒã ãäžã決å®ã«åœ±é¿ãäžããããšããŠããŸãã
ããªã«ïŒããªãã¯äŒç€Ÿã§éèŠãªåœ¹å²ãæãããŠããããã§ãã ããã«å人çãªåé¡ã«ç§»ããŸãããã æããå€ãŸã§è©±ãããšãã§ãããæ°ã«å ¥ãã®Jenkinsæ©èœã¯äœã§ããïŒ
KosukeïŒãŸããæããæ©ãŸã§è©±ãã®ã¯é£ããã§ãããã ç§ã¯ä»ãçµç¹ãã©ã®ããã«æ©èœãããã«ãã£ãšèå³ãæã£ãŠããŸã-ããã¯ç§ã®æ©èœã®ããã ãšæããŸãã ç§ãäžäººã§åããŠãããšããç§ã®æ³šæã¯åã ã®æ©èœã«ãã£ãšéäžããŠããŸããã ä»ã¯ããã¯æããªãã®ã§ãããªãã®è³ªåã«çããã®ã¯é£ããã§ãã
ããªã«ïŒããããããããããäœå¹Žãåã«å®è£ ãããæ©èœã®ãã¡ãéåžžã«èªãã«æã£ãŠãããã®ãèŠããŠããŸããïŒ
KosukeïŒç§ãã¡ãåãçµãã æè¿ã®éèŠãªæ©èœã®1ã€ã«ã€ããŠè©±ãããšãã§ããŸã-ããã¯ãŠãŒã¶ãŒã«ãšã£ãŠããèå³æ·±ããã®ã«ãªããšæããŸãã ããã¯æšå¹Žã®Jenkins Configuration as Codeã®ãããžã§ã¯ãã§ãã ãŠãŒã¶ãŒãGUIã§ããŠã¹ãã¯ãªãã¯ããã ãã§Jenkinsã管çããããšãããgââitãªããžããªã®æ§æãã¡ã€ã«ã䜿çšããŠæ§æããããã«åŸã ã«ç§»è¡ããŠããããšãããããŸããã Configuration as Codeãããžã§ã¯ãã®å¿ èŠæ§ã¯é·ãéæããããå€ãã®äžæçãªæŸèæããã®æ©èœãå®è¡ããããã«æžãããŸããã ãããããããã®åãçµã¿ã¯ã©ããååãªãã®ã§ã¯ãããŸããã§ããã æåŸã«ããã®æ°ãããããžã§ã¯ãã«èå³ãæã£ãã³ãã¥ããã£ã®äººã ãéããããªã倧ããææ ®æ·±ãããŒã«ãäœæããŸããã ãã®ãããžã§ã¯ãã®å€ãã®åŽé¢ã¯éåžžã«ããå€æããéåžžã«å¹ åºã人æ°ãåŸãŸããããããã¯åã°ããããšã§ãã
å¥ã®ãããžã§ã¯ããJenkins Xãæãåºãããšãã§ããŸããããã¯ããŸã£ããç°ãªãæ¹åãžã®é²åã§ãã Kubernetesãšã®é£æºå°çšã«äœæãããŸããã ãã®å°éåã®ãããã§ãã¹ã ãŒãºãªçµ±åãå®çŸããçµ±åãšç¶ç¶çãªé ä¿¡ããã»ã¹ã®æ¥ç¶ã«ãã£ãŠçããè€éããé ãããšãã§ããŸãã ãã®çµæãç§ãã¡ã®æèŠã§ã¯ãæé«ã®ãã©ã¯ãã£ã¹ãç°¡åã«å®è£ ã§ããŸãã ãã®ãããžã§ã¯ãã®ãããã§ãJenkinsã¯éåžžã«æšæºçãªã¢ã¯ã·ã§ã³ãå®è¡ãããã¹ãŠã®æ©èœãå¿ èŠãªæ§æã«å€ãã®æéãè²»ãããããªãå€ãã®äººã ã«å©çšå¯èœã«ãªããšæããŸãã
RuslanïŒ Jenkinsãæžããšãã«Jenkinsã䜿çšããŠããŸããïŒ
KosukeïŒã¯ããJenkinsãããžã§ã¯ãã«ã¯ç¬èªã®JenkinsããããŸãã å®éãåãã©ã°ã€ã³ãšã³ã¢ã§ãã«ãªã¯ã¬ãã¥ãŒãå®è¡ãã倧ããªã€ã³ã¹ã¿ã³ã¹ããããŸãã ããã«ãã»ãã¥ãªãã£æ©èœã®éçºã¯ç¬ç«ããç¬èªã®ãªããžããªã§è¡ããããããã»ãã¥ãªãã£ãšè匱æ§ã«é¢é£ããç¹ã«éèŠãªäœæ¥ã®ã³ããŒããããŸãã æåŸã«ãããŒã®çœ²åããªãªãŒã¹ã«é¢é£ãããã®ãªã©ãããã«éèŠãªã¿ã¹ã¯ã®ããã®3çªç®ã®ã€ã³ã¹ã¿ã³ã¹ããããŸãã ããã3ã€ã«å ããŠã24æéäœå¶ã§å¥ã®ã³ããŒãç§ã®å®¶ã§æ©èœããŸãã
ããªã«ïŒãžã§ã³ãã³ã¹Xã«ã€ããŠã話ããŸããããžã§ã³ãã³ã¹èªäœã¯ã¹ã€ã¹ã®ãã€ãã®ãããªãã®ã§ããã©ã°ã€ã³ãããã°äœã§ãã§ããŸãã ãããããžã§ã³ãã³ã¹Xã¯ãããã©ããããé«åºŠã«å°éåãããŠãããPipelineã«ååšããKubernetesãšé£æºããŠããŸãã ããªããšããªãã®äŒç€Ÿã¯ãã©ã®ãããªæè¡æŠç¥ãéµå®ããŠããŸããïŒ JenkinsãšJenkins Xã®ã¿ããµããŒãããŠããŸããïŒ ãŸãã¯ãããã«å ããŠãMesosã¯ã©ã¹ã¿ãŒçšã®Jenkins XXãCloud Foundryçšã®Jenkins XXXãªã©ããããŸããïŒ
KosukeïŒã³ãã¥ããã£ã®åå¿ã«å€§ããäŸåãããšæããŸãã æ®éçãªãã©ãããã©ãŒã ãæã€ããšã¯ç¢ºãã«éåžžã«éèŠã§ãã åé¡ã¯ã誰ããã®æè»æ§ãæ£ç¢ºã«å®è£ ãããã§ãã çŸåšããŠãŒã¶ãŒã¯éåžžãçŽæ¥ã¢ã¯ã»ã¹ã§ããŸãã ããã¯ã倧äŒæ¥ã§äœãç°åžžãªããšãããŠããå Žåã«äŸ¿å©ã§ãã ãããåæã«ããã®ãããªæè»æ§ãå¿ èŠãšããªãå€ãã®äººã ãç¥ã£ãŠããŸãã ããªãããã€ãã³ã°ã«ãŒã ã«æ¥ãŠããµã³ãã€ãããäœãããã«é Œãã ãšæ³åããŠãã ããã 7çš®é¡ã®ãã³ã5çš®é¡ã®ãã¿ãŒã4çš®é¡ã®ããŒãºããéžæã§ããŸãããã¹ãŠã®ææã決ããå¿ èŠããããŸãã ããããããªãã¯ãã®ãã¹ãŠã®éžæãå¿ èŠãšããããã ãããããµã³ãã€ãããå¿ èŠãšãããããæ£ããããæ¹æ³ãèŠã€ããããããŸããã å€ãã®äººã ããžã§ã³ãã³ã¹ã«å¯ŸããŠãã®ãããªæ 床ãæã¡ããã¹ãŠã®æè»æ§ãç§ãã¡ã®åŽã«æ®ãããšãæãã§ããããšãç¥ã£ãŠããŸãã Jenkins Xã¯ããã®æ¹åãžã®æåã®é倧ãªã¹ãããã§ãã ãã®ãããžã§ã¯ããåŒãç¶ãæåããå Žåã¯ããã¡ãŒã ãŠã§ã¢ãšIoTãã¢ãã€ã«ãã©ãããã©ãŒã ããŸãã¯æ©æ¢°åŠç¿ã§åæ§ã®ããšãè©ŠããŠã¿ãããšæããŸãã å€ãã®åçŽåžå Žã§ã¯ã補åãè¿ éã«çç£ã§ããããŒã«ãå¿ èŠãªã ãã ãšæããŸãã ããªãã¯ãã·ã¢ããæ¥ãã®ã§ãJetBrainsã«ã€ããŠç¥ã£ãŠããå¯èœæ§ãé«ãã§ããïŒ
ããªã«ïŒãã¡ããã
KosukeïŒåœŒãã¯åæ§ã®æŠç¥ã«åŸã£ãŠãããšæããŸãã ãããã¯éåžžã«æè»ãªåºç€ãåããŠããããã®äžã«ããã«å€ãã®ç¹å¥ãªã¢ããªã³ããããæ¬è³ªçã«åãèŠçŽ ãç°ãªãæ¹æ³ã§çµã¿ç«ãŠãããŸãã ãŠãŒã¶ãŒã¯ããã«æè¬ããŠãããç§ã¯åœŒãã®ã¢ãããŒããæ¬åœã«å¥œãã§ãã
ããªã«ïŒé·å¹Žãç§ã¯å€ãã®ã³ãã¥ããã£ã§åãåçã芳å¯ããŠããŸãããã1ã€ãŸãã¯å¥ã®ãã©ã°ã€ã³ã䜿çšããããã¢ããã€ã¹ãããšã httpsïŒ//plugins.jenkins.ioãç§ã倧ãã«å©ããŠãããŸããæ¿èªããããã¹ãŠã®ãã©ã°ã€ã³ããããŸãã åé¡ã¯ã人ã ããã¹ãŠã®ã±ãŒã¹ã§1ã€ã®æ±çšããŒã«ã䜿çšããããšããŠããããšã§ããããã¯ç¹å®ã®ã±ãŒã¹ã«ã¯é©ããªãããšããããããŸãã ãããã£ãŠãä»ã§ã¯éåžžããã€ãã©ã€ã³ãšãã1ã€ã®ããŒã«ã®ã¿ããå§ãããŸããããã¯ãããããç¶æ³ã«é©ããçæ³çãªããŒã«ã§ãã ããããæ°ããåé¡ãçºçããŸãã 人ã ã¯ãå éšã§ã®é 眮æ¹æ³ãç解ããã«ãã¹ã¯ãªãããã€ãã©ã€ã³ãŸãã¯å®£èšåãã€ãã©ã€ã³ã䜿çšããããšããŸãã ã€ã³ãã©ã¹ãã©ã¯ãã£ã«åé¡ããããŸããããŒãéã®éä¿¡ã®ç¢ºç«ãããŒã¿ã®å ±æããšãŒãžã§ã³ããšãã¹ã¿ãŒéã«ç°åžžãªãã©ãã£ãã¯ãçºçããããŸãã¯ãã¹ã¿ãŒã®ã¹ã±ãŒãªã³ã°ã«é¢ããåé¡ããããŸãã Jenkins Xã®ããã«ãåé¡ã解決ããå¯äžã®æ£ããæ¹æ³ã瀺ãããŒã«ã¯ãããªãã®èŠ³ç¹ããã¯ã©ã¡ããåªããŠããŸããïŒ ãŸãã¯ãScripted Pipelineã®ãããªãããªããäœã念é ã«çœ®ããŠããã®ããå°ããããŒã«ã§ããïŒ
sukeä»ïŒããªããæ£ããç解ããŠãããã©ããã¯ããããŸããããçããããšããŸãã æ¥æ¬èªã«ã¯ãã«ã¿ããšããèšèããããŸãããæ£ç¢ºã«ç¿»èš³ããæ¹æ³ãããããŸããã ç¹ã«æéã§äœ¿çšãããŸãã çåŸãåŠã¶å³å¯ã«å®çŸ©ãããåãã«ã€ããŠè©±ããŸããããšãã°ãç¹å®ã®ææããããããã«ç¹å®ã®æ¹æ³ã§æãäžããããšã§ãã ç§ã¯ãããå°ããã£ãã®ã§ãæãåçŽãªãã®ãç¥ã£ãŠããŸãã 課é¡ã¯ãäžé£ã®åçŽãªåããããçš®ã®ãã¿ãŒã³ããŸãã¯ãã¹ããã©ã¯ãã£ã¹ãèšæ¶ããããšã§ãã ããããããã¯ã»ãã®å§ãŸãã«éããŸããã ãã®ããŒã¹ãç¥ã£ãŠããã°ãåºæ¬çãªåãèªäœã«éåããããšãªããç¶æ³ããããå¿ èŠãšããå Žåããããæ£ããæ®ãããšãã§ããŸãã ããªãã¯ããªãèªèº«ã®ã¹ããŒã¹ãããªãã®é åãå匷ããŸãããåæã«ãå ±éã®åºç€ãç¥ã£ãŠããããšã¯ãšã«ããããªããå©ããŸãã ããªãã圌女ãç¥ããªãå Žåãããªãã¯ãã€ãèªåèªèº«ã«å°ããŸã-ç§ã¯æ£ããããšããã£ãŠããŸããïŒ ããªããæžãããã®ãæ©èœããŠããŠããããªãã¯ãŸã çåãæ±ããŠããã§ãããã
äžè¬çã«ãããªãã®è³ªåã¯ã«ã¿ãæãåºãããŸããã ãžã§ã³ãã³ã¹ã«ã€ããŠãåæ§ã®ç¶æ³ããããšæããŸãã Jenkins XãããŒã¹ãæäŸããŸããããã«æ·±ãç解ãå§ããããå¿ èŠã«å¿ããŠãã©ã°ã€ã³ãªã©ã®å©ããåããŠãã®ãŸãŸã«ããŠããããšãã§ããŸãã ãã¡ãããJenkins Xã¯Kubernetesã§ããè¯ãäœéšãæäŸããããã«æè»æ§ãç ç²ã«ããªããã°ãªããŸããã ãããããžã§ã³ãã³ã¹Xããã¹ããã©ã¯ãã£ã¹ã«åãã£ãŠããªããæŒãé²ããŠãããšããäºå®ã¯ãããªããéžæè¢ã奪ãããŠãããšããæå³ã§ã¯ãããŸããã æŠããŠãããã¯ã©ã®ãœãããŠã§ã¢ã«é¢ããŠãåœãŠã¯ãŸããŸãã Jenkins Xã§ã¯ãèãæ¹ã«éèŠãªå€åããã£ãã ãã§ãã 以åã¯ãã·ã¹ãã ã®éèŠãªèŠçŽ ã§ãããã©ãããã©ãŒã ãšãã©ã°ã€ã³ã®ã¿ãäœæããŸãããããããçµã¿ç«ãŠãã®ã¯ããŠãŒã¶ãŒæ¬¡ç¬¬ã§ãã Jenkins Xã§ã¯ãã³ãã¥ããã£ã¯æ°ããã¢ãããŒãã«ç§»è¡ããŸãããç§ã®æèŠã§ã¯ãããã¯éåžžã«éèŠãªã¹ãããã§ãã
ããªã«ïŒæ°ã«ããªãå Žåã¯ãããã«2ã€ã®è³ªåããããŸãã æšå¹Žãã©ã®æ©èœãæãèŠåŽããŸãããïŒ åãããžã§ã¯ãã«ã¯å°é£ãªæéããããŸã-ããªãã®å Žæã§ã©ã®ããã«èŠãããæããŠãã ããã
KosukeïŒç§ãã¡ã¯äººçãäœåºŠãçå£ã«å°ç¡ãã«ããŠããŸããã åé¡ã¯ããžã§ã³ãã³ã¹ãæé·ããã«ã€ããŠããžã§ã³ãã³ã¹ã®ç©Žãæ¢ãå§ããä»ã®äŒæ¥ãšãã®ã»ãã¥ãªãã£ããŒã ãããç§ãã¡ã®ãããžã§ã¯ãããŸããŸã泚ç®ãéãå§ããããšã§ãã ãã®ãããå€éšããå¯ããããè匱æ§ã¬ããŒãã®æ°ã¯ææ°é¢æ°çã«å¢å ãå§ããŸããã ç¹ã«ããããã®ãªã¯ãšã¹ãã®äžéšã«æéããããè匱æ§ãã¯ããŒãºããå¿ èŠããããšæãããå Žåãããããå°ãæããªãããšããããŸããã ããã¯ãã³ãã¥ããã£ã«ãã£ãŠäœæãããæ©èœã«é¢ããŠã¯ç¹ã«å°é£ã§ããã ãŸããè匱æ§ãä¿®æ£ãããã¢ããããŒããã€ã³ã¹ããŒã«ãããšããŠãŒã¶ãŒãæ··ä¹±ããããšããããŸãã ããããªããšããŠãŒã¶ãŒãã»ãã¥ãªãã£æŽæ°ããã°ã©ã ãã€ã³ã¹ããŒã«ããããšãæããã®ã§ãããã¯éåžžã«æãŸãããªãããã§ãã
ããªã«ïŒã©ã®æ©èœããªãªãŒã¹ã«å«ãããã決å®ããéå¶æ©é¢ããããŸããïŒ ãã®ãããªæ±ºå®ãã©ã®ããã«è¡ããããŠãŒã¶ãŒããªãªãŒã¹ã«ããã€ãã®æ©èœãå«ããããã«æ±ããããšãã§ããŸããïŒ å¯èœã§ããã°ãCouldBeesãŸãã¯ãªãŒãã³ãœãŒã¹ã®Jenkinsã®ãŠãŒã¶ãŒãåªå ããã®ã¯èª°ã§ããïŒ æåŸã«ãå¯èœã§ããã°ãä»åŸ6ãæãã1幎ã®èšç»ã«ã€ããŠæããŠãã ããã
KoskeïŒããã§èå³æ·±ãç¹ããããŸããCloudBeesã¯JenkinsãææããŠããŸããããããã¯2ã€ã®å¥åã®ãããžã§ã¯ãã§ãããããããç¬èªã®ææ決å®æ§é ãæã£ãŠããŸãã CloudBeesã¯åã«Jenkinsã®æ倧ã®è²¢ç®è ã§ãããå€ãã®CloudBeesãåæã«ã³ãã¥ããã£ã§åããŠããŸãã éå»æ°å¹Žã«ããã£ãŠãç§ãã¡ã¯ãžã§ã³ãã³ã¹ã§ããæ確ãªå¶åŸ¡æ§é ãäœæããããšããŠããŸããã ãã®ç®çã®ããã«ã Jenkins Enhancement ProcessãäœæããŸãã...
ããªã«ïŒäžæããŠç³ãèš³ãããŸãã-Javaã®ããã«ãJEPãšç¥ãããŸããïŒ
KosukeïŒãã¡ããã§ãã æããã«ãç§ãã¡ã¯ãã®æŠå¿µãçºæããŸããã§ããããPythonãJavaãããã³ä»ã®ããã€ãã®ã³ãã¥ããã£ãããããåçšããŸããã ããã§ã®äž»ãªã¢ã€ãã¢ã¯ãæ©èœã«é¢ããäž»èŠãªäœæ¥ãéå§ããåã«ãã³ãã¥ããã£ãæèŠãè¡šæããŠã³ã³ã»ã³ãµã¹ã«å°éã§ããããã«ããããšã§ãã ããã¯ãCloudBeesãæ°ããæ©èœãäœæãããšãã«ãŸãã«è¡ãããšãªã®ã§ãåãåã£ãå¿çã«å¿ããŠã³ãŒã¹ãå€æŽããæ©äŒããããŸãã ããã¯ãäœæ¥ã§å®è£ ã§ããèšç»èŠçŽ ã§ãã ç§ãã¡ã¯ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã§ãããããä»ã®ãããžã§ã¯ãåå è ã«äœããã¹ãããçŽæ¥äŒããããšã¯ã§ããŸããã æã 圌ãã¯ç§ãã¡ã®å£°ãèããŸãããæã èããŸããã
次ã®6ãæã®èšç»ã«ã€ããŠã¯ã次ã®ãããªçŸåšã®åãçµã¿ã®å€ãã«åŒãç¶ãåãçµã¿ãŸãã JenkinsXãCloudBeesã®äžéšã®åŸæ¥å¡ãšå€ãã®ãµãŒãããŒãã£ã®è²¢ç®è ãããã«åãçµãã§ããŸãã Configuration as Codeããã©ã°ã€ã³éçºè ã®éã§ããäžè¬çã«ãªãããšãé¡ã£ãŠããŸãã æŠããŠããã®åºç€ã¯ãã§ã«äœæãããŠããã®ã§ããã®ã·ã¹ãã ãä»ããŠæ£ããæ¥ç¶ã§ããããã«ãããã€ãã®ãã©ã°ã€ã³ãæ§æããå¿ èŠããããŸãã æåŸã«ãæ°ããJEPãçºçããå Žåã¯ããããã«åãçµã¿ãŸãã
ããªã«ïŒããŠãJEPãç¹èš±ãååŸããŠããªãããšãæåŸ ããŸããã:)質åã¯ãJenkinsã®èè ã§ããããªãã§ã-ãã®ã¢ã€ãã¢ã¯Scripted Pipelineã§ãããïŒ
KosukeïŒããã¯èå³æ·±ã質åã§ãã äºå®ãã³ãã¥ããã£ã®å€ãã®ã€ãã·ã¢ããã¯ããã°ãã°ã¯ãªãã£ã«ã«ãã¹ã«éãããå®éšã¬ãã«ã®ãŸãŸã§ãã Pipelineã®äœæ¥ãéå§ããåã«ãåã空éã§äººã ã¯ãã§ã«äŒŒããããªããšãããããšããŠããã®ã§ããããã®è©Šã¿ã«æ £ããæ©äŒããããŸããã ãããã£ãŠãç§ãã¡ã¯å®éããã€ãã©ã€ã³ã®çºæè ã§ã¯ãããŸããã§ããã ãããã®åä»»è ã®1ã€ã¯Build Flowãã©ã°ã€ã³ã§ãCloudBeesã®åŸæ¥å¡ã®1人ãäŒç€Ÿã«å ¥ç€Ÿããåã«äœæããŸããã ããšã³ã·ã¹ãã ããšããçšèªã¯éåžžã«æåããŠãããšæããŸããå®éã®ãšã³ã·ã¹ãã ã®ããã«ãã¹ãŠãå®éã«èµ·ãããŸãã誰ããäœæãããã¯ãããžãŒã¯åžžã«é²åãå€åããŠããŸãã
RuslanïŒ Scripted Pipelineã®å®è£ ã«åœ±é¿ãäžããŸãããïŒ
KosukeïŒã¯ããå ã®ããŒãžã§ã³ã§ã¯ã
ããªã«ïŒç¥ã£ãŠããããã«ãDSLãå®è£ ããã«ã¯ãéçãšåçã®2ã€ã®æ¹æ³ããããŸãã ã¹ã¯ãªãããã€ãã©ã€ã³ã«åçãªã¢ãããŒããéžæãããã®ã¯ãªãã§ããïŒ
KosukeïŒéçãªã¢ãããŒããšåçãªã¢ãããŒããããªããäœãæå³ããã®ããç§ã«ã¯ããããããŸããã
ããªã«ïŒéçDSLã䜿çšãããšãå®è¡åã®ã³ãŒãã«ããçšåºŠã®èªä¿¡ããããŸãã ããšãã°ãJavaã®DSLã䜿çšããå Žåããã¹ãŠã®APIãšã€ã³ã¿ãŒãã§ãŒã¹ãäºåã«ç¥ãå¿ èŠããããŸãã åçãªã¢ãããŒãã«ãããå®è¡æã«æ€èšŒãçŽæ¥å®è¡ããŸãã ã³ãŒããç¡å¹ã§ãã£ãŠãããã·ã³ã¯ãããå®è¡ããããšããŸãããå¿ èŠã§ããã°ãšã©ãŒãã¹ããŒããã ãã§ãã ãã€ãã©ã€ã³ã®å®£èšããŒãžã§ã³ã§ã¯ããã«ãã¹ã¯ãªããã®ããªãšãŒã·ã§ã³ãçµã蟌ãããšã§å€ãã®ãšã©ãŒãæé€ã§ããŸãã
KosukeïŒæ£çŽã«èšããšãã³ã³ãã€ã«ããã€è¡ããããã¯æ£ç¢ºã«ã¯éèŠã§ã¯ãããŸããã ãã ããã¹ã¯ãªãããã€ãã©ã€ã³ãèšèšãããšãã«åŸã£ãäžè¬çãªèšå®ã«ã€ããŠã¯èª¬æã§ããŸãã ãã段éã§ã¯ãããªãã®æ°ã®JenkinsãŠãŒã¶ãŒãèªååã®è€éãã«ãã£ãŠå€§ãã劚ããããŠããŸããã å€ãã®ã³ã³ããŒãã³ãã®æ£ããçžäºäœçšãä¿èšŒããå¿ èŠããããŸããã ã³ãŒããã³ã³ãã€ã«ããããã¹ããå®è¡ãããåŸãå±éã確èªããããŸã§åŸ æ©ããå¿ èŠããããŸãã ãŸãããã§ã«ãã®ããã»ã¹ãã³ãŒãã®åœ¢ã§èšè¿°ããããšããèŠæããããŸãã-ã»ãŒåœæãã³ãŒããéåžžã«äººæ°ããã£ãããã€ã³ãã©ã¹ãã©ã¯ãã£ã§ããã éçºè ã¯ã誰ãããããžã§ã¯ã管çã·ã¹ãã ã®ãã¡ã€ã«ã䜿çšããŠç®¡çã§ããããšãæãã§ããŸããã ããã2ã€ã®ããŒãºã®ãã¡ãScripted PipelineãçãŸããŸããã ãã ãããã®äœ¿çšã«ã¯éèŠãªç¥èãå¿ èŠã§ãããçŽèŠ³çã§ã¯ãªãã£ããããè€éãªãªãŒã±ã¹ãã¬ãŒã·ã§ã³ãå®è£ ããããã«ã¹ã¯ãªãããã€ãã©ã€ã³ã䜿çšããããšãäœåãªãããã人ã ãã§ãªãã誰ããPipelineã«ã¢ã¯ã»ã¹ã§ããããã«ããããšèããŸããã å€ãã¯ããã¥ãŒãªã³ã°ã®å®å šæ§ã§ã¯ãªããæå¿«ããå©äŸ¿æ§ãã¢ã¯ã»ã·ããªãã£ãå¿ èŠãšããŠããŸããã ãããã宣èšçãã€ãã©ã€ã³ã®å§ãŸãã§ãã
KirillïŒä»æ¥ããŸãJenkinsãã©ã°ã€ã³ããããŸããããã«ã¯éåžžãã¢ãããŒã·ã§ã³ãšã¡ã¿ããã°ã©ãã³ã°ãåããéçAPIããããŸãã 次ã«ãè¿œå ã®DSLãã¢ããŠã³ã¹ããScripted Pipelineãã©ã°ã€ã³ããããŸãã 宣èšçãã€ãã©ã€ã³ã¯ã»ãŒåãããšãè¡ããŸãããæè»æ§ãäœããªããŸãã ä¿å®ãç°¡åãªãã®-PipelineãŸãã¯éåžžã®Jenkinsçšã®ãã©ã°ã€ã³ïŒ ã€ãŸãããžã§ã³ãã³ã¹ããã§ãã
KosukeïŒ 2ã€ã®ç°ãªãèšèªã«ã€ããŠè©±ããŠãããšããèããæã¡ãããããŸããã ãããŸã§ã®ãšãããPipelineã®èšèªãèŠã€ããããšãã§ããªãã£ãããã§ããPipelineã¯ãåçŽãªã¿ã¹ã¯ã«ã¯äŸ¿å©ã§ããããæ°ãããŠãŒã¶ãŒã«ã¯ã¢ã¯ã»ã¹ã§ããŸãããæè»æ§ã«åªããŠããŸãã ãžã§ã³ãã³ã¹ãåžžã«ç«ã£ãŠããããªãŒã¹ã¿ã€ã«ãžã§ãã¯ãããšããšéåžžã«ããŸãèšèšãããŠããŸããã è€éãªæäœãè¡ãå¿ èŠãããå Žåã¯ããã©ã°ã€ã³ãäœæããFreestyle Jobã§ãããã®ãã©ã°ã€ã³éã®ã¹ããŒã¹ãåããããšãã§ããŸãã ããã¯ããŒã®ãããªãã®ã§ããã§ã³ã¬ãŒãã«ãããã泚ãããšã§åŸãããŸãã Pipelineã§ã¯ãåæ§ã®ãœãªã¥ãŒã·ã§ã³ãé©çšããå¿ èŠããããšæããŸãã ç§ãã¡ã¯ãã§ã«ãã®æ¹åã§äœããããŠãã-äŸãã°ãå ±æã©ã€ãã©ãªæ©èœã ããã§ãããã®åéã§ããã¹ãããšããŸã ããããããããšã¯æããã§ãã ããã«ã€ããŠã¯ã補åããŒã ãšéçºè ãšé·ãé話ãåã£ãŠããŸããã ç§ã圌ãã«åœ±é¿ãäžããããšãã§ããããšãé¡ã£ãŠããŸãã
ããªã«ïŒç§ã®æåŸã®è³ªåã¯ããžã§ã³ãã³ã¹ã®ã©ã€ããµã€ã¯ã«ã«ã€ããŠã§ãã ãã®ãããžã§ã¯ãã®éèŠãªãã€ã«ã¹ããŒã³ã¯Jenkins 2ã®ãªãªãŒã¹ã§ããããã®äžã®å€ãã®æ©èœãšAPIã«ã¯è匱æ§ããããŸããã Jenkinsãšãã®ãã©ã°ã€ã³ã®ãœãŒã¹ã³ãŒããèŠããšãéåžžã«è€éãªã¢ãŒããã¯ãã£ããããããªãã®æ°ã®åé¡ããããŸãããã®äººèªèº«ããããžã§ã¯ãã®æŽå²ã®äžéšã§ã¯ãªãã£ãå ŽåããããèŠã€ããã®ã¯éåžžã«å°é£ã§ãã ããªãã®èŠ³ç¹ããããããå¿ èŠãªå Žåã以åã®ããŒãžã§ã³ãšä»¥åã®ã¢ãŒããã¯ãã£ãœãªã¥ãŒã·ã§ã³ãšã®äºææ§ãæãªãããå¯èœæ§ã¯ãããŸããïŒ
KosukeïŒãã®ãããžã§ã¯ãã§ã¯ãé²åãç¶ããããšãéèŠã§ãã å®éãããªããæé·ããã«ã€ããŠãç¹å®ã®æè¡çè² åµãèç©ãããŸãã ãããããžã§ã³ãã³ã¹ã®è€éãã«ã€ããŠã®ããªãã®è©äŸ¡ã«ã¯åæã§ããŸããã ããã¯çŽ800人ãäœæãããããžã§ã¯ãã§ã1,600ã®ãã©ã°ã€ã³ããããŸããããã念é ã«çœ®ããŠãéåžžã«ã¢ã¯ã»ã¹ãããããšæããŸãã ç¶æ³ã¯ãããªãã説æããã»ã©é倧ã§ã¯ãããŸããã ããã§ããéçºã¯æ¬åœã«å¿ èŠã§ãã æšå¹Žãç§ã¯æ¯Shiftçã«èšã£ãŠæãæ¯ã£ãŠãã»ãã¥ãªãã£ã®å Žåãé€ããŠãåŸæ¹äºææ§ã®å³æ Œãªé å®ãå«ãããŠãŒã¶ãŒã«ããã¬ãã¥ãŒã®åæçŽæã®ããã€ããä¿ããã·ããã®ã¢ããšããã¿ã€ãã«ã®æçš¿ãæžããŸããã ãã®ãããã¯ããŸã ã³ãã¥ããã£ã§è°è«ãããããšãé¡ã£ãŠããŸãããä»ã®ãšããããŸãå€ãã¯èãããŠããŸããã
RuslanïŒåŸæ¹äºææ§ããªã·ãŒã¯ãJavaãæºæ ããŠãããã®ãšäŒŒãŠããŸããïŒ çµå±ã15幎ãããã«ã¯20幎åã®ããŒãžã§ã³ãšã®äžäœäºææ§ããããŸãã ãŸãã¯ãPython 2ãšPython 3ã®ç¶æ³ã«äŒŒããã®ããããŸããããããã¯ãŸã äºãã«æ©èœããŸãããïŒ éèŠãªæ©èœãå®è£ ããããã«åŸæ¹äºææ§ãç Žãæºåã¯ã§ããŠããŸããïŒ
KoskeïŒæ£çŽãªãšãããJavaãšPythonã®ã©ã¡ãã§äºææ§ã芳å¯ããããšããåé¡ãæèµ·ããã®ã¯æ£ãããšã¯æããŸããã ãŠãŒã¶ãŒãå¿ èŠãšãããœãããŠã§ã¢ã®çš®é¡ã«ã€ããŠèããå¿ èŠããããŸãã é倧ãªåé¡ã®1ã€ã¯ãJenkinsã®ãã©ã°ã€ã³ãäºãã«ç¬ç«ããŠäœæãããããããé£æºãããã®ãäžåœã«é£ããããšã§ãã ãã®åé¡ã解決ããéã«ãŠãŒã¶ãŒã€ã³ã¹ã¿ã³ã¹ãå£ããå Žåããã®ãããªãœãªã¥ãŒã·ã§ã³ã¯å¿ èŠãããŸããã ãããŠãçµæãšããŠããè¯ããããéãåäœããã·ã¹ãã ãåŸãããã°ãäºææ§éåãæ£åœåããããããããŸããã ãã®ç¹ã«é¢ããŠã¯ãèšèªéçºè ãããæè»æ§ããããšæããŸããäºææ§ãå³ããå®ããšã¯çŽæããŠããŸããã Jenkins Xãªã©ã®æ°ããããŒãžã§ã³ãäœæããããšãèããŠããŸããæçµçµæãçŽæ¥äºææ§ã®èŠä»¶ãæºãããŠããéãããã®åé¡ã«ã€ããŠã¯ããèããŸããã
RuslanïŒçŽ æŽããããçããŠãããŠããããšãïŒ
Koskeã¯ã4æ5ã6æ¥ã«éå¬ãããJPointã«ã³ãã¡ã¬ã³ã¹ã§Jenkinsã«ç»å ŽããSuperpowersã«é¢ãããã¬ãŒã³ããŒã·ã§ã³ãè¡ããŸã ã ããã«ãå ±ååŸã«ãã£ã¹ã«ãã·ã§ã³ãšãªã¢ã§åœŒãšãã£ããããããšãã§ããŸãã JPointã®è©³çŽ°ãšãã±ããã®è³Œå ¥ã«ã€ããŠã¯ãäŒè°ã®å ¬åŒWebãµã€ãã§ç¢ºèªã§ããŸãïŒ 3æ1æ¥ã«ãã±ããã®äŸ¡æ Œãäžæããããšãå¿ããªãã§ãã ããïŒã