Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CircleCI first-step

CircleCI first-step

Hisashi.Iguchi

April 27, 2018
Tweet

More Decks by Hisashi.Iguchi

Other Decks in Technology

Transcript

  1. $JSDMF$*pSTUTUFQ
    !IJTBDIJ
    'SJ

    ͋ͭ·Εʂ$*$%πʔϧେू߹ʂɹDOEKQୈճ
    !ΦϥΫϧ੨ࢁηϯλʔ

    View full-size slide

  2. ਓ෺
    w ࢯ໊
    w Ҫޱ߃ࢤ )JTBTIJ*HVDIJʣ
    w ॴଐ
    w %F/"48&5(S 4PGU8BSF&OHJOFFSJO5FTU

    w ։ൃޮ཰޲্ͷͨΊͷࣗಈςετͷ։ൃಋೖ
    w ࣾ಺ఏڙதͷ$JSDMF$*&OUFSQSJTFͷӡ༻อक

    View full-size slide

  3. ΞδΣϯμ
    w جຊ৘ใ
    w δϣϒͷछผ
    w ୯Ұδϣϒ
    w 8PSLqPX
    w ػೳ঺հ
    w ·ͱΊ
    w ͓·͚

    View full-size slide

  4. $JSDMF$*࢖ͬͯ·͢ʁ

    View full-size slide

  5. WFS
    -JOVY൛
    .BD04൛
    ϦϦʔε

    ग़యɿϑϦʔૉࡐͺͨͦ͘ ࡱӨऀɿ͢͠ͺ͘ 63-IUUQTXXXQBLVUBTPDPNQPTUIUNMʢࢀরʣ

    View full-size slide

  6. WFSΛ
    த৺ʹ࿩͠·͢

    View full-size slide

  7. 4VOTFUUJOH$JSDMF$*
    "VHVTU

    ग़యɿϑϦʔૉࡐͺͨͦ͘ ࡱӨऀɿ:BNBTIB 63-IUUQTXXXQBLVUBTPDPNQPTUIUNMʢࢀরʣ
    IUUQTDJSDMFDJDPNCMPHTVOTFUUJOH

    View full-size slide

  8. 8IBU$JSDMF$*
    w ެࣜαΠτɿIUUQTDJSDMFDJDPN
    w -JOVY.BD04ͷ4BB4ܕ$*4FSWJDF
    w +FOLJOTͱҧ͍Πϯϑϥͷӡ༻อकෆཁɹ˞&OUFSQSJTF൛͸ཁӡ༻อक
    w (JU)VC #JUCVDLFUͱ࿈ܞ
    w ίϯςφϕʔεͰδϣϒΛ࣮ߦ
    w δϣϒఆٛϑΝΠϧΛϦϙδτϦ಺ʹ؅ཧ
    w TUBDLTIBSFͰͷೝ஌౓͸্Ґ
    w IUUQTTUBDLTIBSFJPDPOUJOVPVTJOUFHSBUJPO

    View full-size slide

  9. 1SJDJOH
    w 1SJDJOHBOE1MBO*OGPSNBUJPO IUUQTDJSDMFDJDPNQSJDJOH

    w େ͖͘෼͚ͯλΠϓ
    w -JOVY.BD04&OUFSQSJTF

    ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOH

    View full-size slide

  10. 1SJDJOH-JOVY
    w ݱࡏ͸ίϯςφ୯ҐͰͷྉۚઃఆ
    w ࠓޙैྔ՝੍ۚʹมߋ༧ఆͱͷ͜ͱʢมߋ࣌ظ͸ະఆʣ

    w 044QSPKFDUͰ͋Ε͹ίϯςφ·Ͱແྉ
    w ίϯςφແྉ
    w QSJWBUFϦϙδτϦͰ΋ແྉ
    w ݄࣌ؒ
    w ͋ͨΓ
    ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOHCVJMEMJOVY

    View full-size slide

  11. 1SJDJOH.BD04
    w λΠϓͷྉۚϓϥϯ

    w 044QSPKFDU͸EJTDPVOU͋Γʢαϙʔτ΁࿈བྷʣ
    'SFF5SJBM
    XFFL
    ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOHCVJMEPTY

    View full-size slide

  12. 1SJDJOH&OUFSQSJTF
    w Ϣʔβ୯ҐͰͷྉۚઃఆͰ͋Γ೥ؒܖ໿

    w .BD04Λར༻͢Δ৔߹͸೥ؒܖ໿Ͱ໰͍߹Θͤ
    w ίϯςφ୯ҐͰͷܖ໿
    w -JOVYWFS .BD04WFS
    ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOHCVJMEFOUFSQSJTF

    View full-size slide

  13. ొ࿥
    w 4JHOJOɿIUUQTDJSDMFDJDPNTJHOVQ
    w (JU)VC#JUCVDLFU(PPHMFͷΞΧ΢ϯτ

    ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD4JHOVQ$JSDMF$*63-IUUQTDJSDMFDJDPNTJHOVQ

    View full-size slide

  14. Ϗϧυ
    w δϣϒͷఆٛ
    w ϧʔτͷDJSDMFDJDPOpHZNMʹఆٛ
    w DG
    WFS͸ϧʔτ௚ԼͷDJSDMFZNMʹఆٛ
    w ࣮ߦλΠϛϯά
    w ϦϙδτϦ'PMMPX࣌
    w ର৅ϦϙδτϦʹDPNNJUQVTI1VMM3FRVFTU
    w "1*ܦ༝

    View full-size slide

  15. δϣϒͷछผ

    View full-size slide

  16. δϣϒఆٛͷछྨ
    w ୯Ұδϣϒ
    w ̍ͭͷCVJMEδϣϒͷΈͰߏ੒
    w 8PSLqPX
    w δϣϒΛ෼ׂͯ͠ఆٛ
    w δϣϒ࣮ߦͰ͸δϣϒίϯςφ઎༗
    w ฒྻͰ࣮ߦͤ͞Δ৔߹͸ෳ਺ίϯςφ͕ඞཁ
    w ࣮ߦॱং΍ґଘؔ܎ͳͲ΋ఆٛ

    View full-size slide

  17. δϣϒͷछผ
    ୯Ұδϣϒ

    View full-size slide

  18. ୯Ұδϣϒ

    ඞਢ߲໨
    ɹWFSͷδϣϒͱ
    ɹࣝผ͢ΔͨΊʹඞཁ

    View full-size slide

  19. ୯Ұδϣϒ

    ୯Ұδϣϒͷ৔߹͸
    CVJMEͷδϣϒ໊

    View full-size slide

  20. ୯Ұδϣϒ

    +PCͷఆٛ
    ɹ࣮ߦλΠϓͱ
    ɹ࣮ߦεςοϓΛهࡌ

    View full-size slide

  21. ࣮ߦλΠϓ
    w NBDIJOF
    w ৽ن7.Λ্ཱͪ͛ͯͦ͜Ͱδϣϒ࣮ߦ
    w EPDLFS
    w ࢦఆͨ͠EPDLFSJNBHF্Ͱδϣϒ࣮ߦ
    w NBDPT
    w .BD04্Ͱδϣϒ࣮ߦ

    View full-size slide

  22. ୯Ұδϣϒ

    ࣮ߦλΠϓ
    ɹEPDLFS
    ར༻Πϝʔδ
    ɹHPMBOH

    View full-size slide

  23. ୯Ұδϣϒ

    Πϯσϯτ஫ҙ
    εϖʔεͭ

    View full-size slide

  24. ୯Ұδϣϒ

    Πϯσϯτ஫ҙ
    εϖʔεͭ
    Τϥʔ಺༰දࣔ
    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  25. ୯Ұδϣϒ

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  26. ୯Ұδϣϒ

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  27. δϣϒͷछผ
    8PSLqPX

    View full-size slide

  28. 8PSLqPX




    +PCΛͭ෼ׂఆٛ
    ɹɾDSFBUFDPOUFOU
    ɹɾEFMFUFDPOUFOU
    ɹɾVQEBUFDPOUFOU

    View full-size slide

  29. 8PSLqPX

    8PSLqPX+PC໊শ

    View full-size slide

  30. 8PSLqPX

    δϣϒͷ࣮ߦॱং΍
    ґଘؔ܎Λఆٛ

    View full-size slide

  31. 8PSLqPX

    SFRVJSFTͰ
    ଞ+PCͱͷ
    ґଘؔ܎Λఆٛ

    View full-size slide

  32. 8PSLqPX

    άϩʔόϧͳ؀ڥม਺ͷར༻
    ˞8PSLqPX಺ͰͷΈར༻Մ
    άϩʔόϧͳ؀ڥม਺
    4&55*/(4$POUFYUTΑΓઃఆ
    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  33. 8PSLqPX

    +PCΛఀࢭͯ͠
    "QQSPWF଴ͪͱͳΔ
    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  34. 8PSLqPX

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  35. 8PSLqPX

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  36. 8PSLqPX

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  37. 8PSLqPX

    ಉ͡ఆٛΛ
    Կ౓΋໘౗Ͱ͢Ͷ

    View full-size slide

  38. 8PSLqPX

    ZBNMͷه๏Λ
    ར༻ͯ͠ఆٛ࡞੒

    View full-size slide

  39. EPDLFSίϚϯυͷར༻

    δϣϒ಺Ͱ
    EPDLFSίϚϯυΛ
    ར༻͢Δ৔߹͸
    ຊίϚϯυΛར༻

    View full-size slide

  40. ੒Ռ෺ͱςετ݁Ռͷอଘ
    w TUPSF@BSUJGBDUT
    w ੒Ռ෺Λอଘͯ͠"SUJGBDUT͔Βμ΢ϯϩʔυՄೳʹ͢Δ
    w TUPSF@UFTU@SFTVMUT
    w ςετ݁Ռอଘͯ͠5FTU4VNNBSZ͔Β֬ೝՄೳʹ͢Δ

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  41. 44)σόοά
    w Ϗϧυ࣮ߦதͷίϯςφ΁ϩάΠϯͯ͠σόοά
    w ϩάΠϯʹ͸(JU)VC΁ొ࿥͍ͯ͠Δ44)ΩʔΛར༻
    w Ϗϧυը໘ͷӈ্͔Β44)σόοά࣮ߦՄೳ

    44)Λ༗ޮʹ࣮ͯ͠ߦ
    ਺෼ىಈͨ͠··ͱͳΔ
    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  42. ௨஌
    w Ϣʔβ୯Ґ
    w &NBJM௨஌ɺ8FC/PUJpDBUJPO
    w ϓϩδΣΫτ୯Ґ
    w $IBU/PUJpDBUJPO
    w 4MBDL )JQDIBU 'MPXEPDL $BNQpSF *3$
    w 4UBUVT#VEHFT
    w (JU)VCͷର৅ϓϩδΣΫτ΁දࣔՄೳ

    ग़యɿ(JU)VCDPNͷαʔϏεը໘ΑΓ

    View full-size slide

  43. ॊೈͳDBDIFػߏ
    w SFTUPSF@DBDIFͰऔಘTBWF@DBDIFͰอଘ
    w ࢦఆQBUITͷ৘ใʹLFZΛ͚ͭͯDBDIFʢجຊతʹDMFBOෆՄʣ
    w LFZʹ͸WFSTJPO౳Λࣔ͢஋ΛຒΊΔͷ͕ϕετϓϥΫςΟε
    w औΓग़͢ࡍ͸LFZʹϚον͢Δ৘ใΛऔಘ
    w ೚ҙͷλΠϛϯάͰ೚ҙͷ৘ใΛ֨ೲՄೳ

    View full-size slide

  44. ෳ਺ฒྻ࣮ߦ

    w ґଘ͕ͳ͚Ε͹ෳ਺৚݅Λ
    ฒྻ࣮ͯ͠ߦ
    w SVCZ OPEF
    w -JOVY.BD04
    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  45. DBDIFͱ8PSLqPX
    w ґଘؔ܎͕ͳ͍δϣϒΛฒྻ࣮ߦ
    w +PCؒͰͷσʔλड͚౉͠
    w DBDIFΛ׆༻
    w QFSTJTU@UP@XPSLTQBDFͰ΋Α͍

    δϣϒͷ૯࣮ߦ࣌ؒͷ୹ॖՄೳ

    View full-size slide

  46. εέδϡʔϧ࣮ߦ
    w εέδϡʔϧ࣮ߦ΋Մೳ
    w 8PSLqPXͷδϣϒ
    w ஫ҙ఺
    w 65$Ͱͷهࡌ͕ඞਢ
    w ෼ִ࣮ؒߦͳͲͷදه
    w
    w ໘౗Ͱ΋ ͱهࡌ͕ඞཁ

    ࣮ߦ͢Β͞Εͳ͍
    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  47. $ curl -o /usr/local/bin/circleci \
    https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci \
    && chmod +x /usr/local/bin/circleci
    $ circleci update
    $JSDMF$*-PDBM$-*

    w $-*࣮ߦʹ͸EPDLFS؀ڥ͕ඞਢ
    w 8PSLqPX DBDIF NBDIJOFFYFDVUPSʹ͸ඇରԠ
    $ circleci config validate -c .circleci/config.yml
    config file is valid
    w Πϯετʔϧ
    w ఆٛϑΝΠϧͷ֬ೝ

    View full-size slide

  48. $JSDMF$*-PDBM$-*

    $ circleci build .circleci/config.yml
    w ϩʔΧϧ࣮ߦ
    w DPNNJUQVTI͢Δલʹ֬ೝՄೳ
    w ϩʔΧϧ࣮ߦ͸ൃల్্

    View full-size slide

  49. 1MBOઃఆͱར༻ঢ়گ
    w 4&55*/(41-"/͔Βίϯςφܖ໿΍ར༻ঢ়گΛ֬ೝ

    ར༻ঢ়گ
    ίϯςφ਺
    มߋ
    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

    View full-size slide

  50. ·ͱΊ
    w -JOVYͰ͋Ε͹ίϯςφར༻ྉແྉ
    w 1SJWBUFϦϙδτϦͰ΋ແྉ
    w 8PSLqPXͰδϣϒ෼ׂ
    w ґଘؔ܎ͷͳ͍δϣϒΛฒྻ࣮ߦ
    w ॊೈͳDBTIFػߏ͕༗ޮత
    w ੍ݶ͸͋Δ΋ͷͷϩʔΧϧͰ΋؆қతͳ֬ೝ͕Մೳ

    View full-size slide

  51. ࢀߟ
    w $POpHVSBUJPO3FGFSFODFɿ
    w IUUQTDJSDMFDJDPNEPDTDPOpHVSBUJPOSFGFSFODF
    w 4BNQMF
    w IUUQTDJSDMFDJDPNEPDTFYBNQMFT
    w "1*3FGFSFODF
    w IUUQTDJSDMFDJDPNEPDTBQJWSFGFSFODF
    w -PDBM$-*
    w IUUQTDJSDMFDJDPNEPDTMPDBMDMJ
    w %JTDVTT
    w IUUQTEJTDVTTDJSDMFDJDPN

    View full-size slide

  52. ͓·͚$JSDMF$*5PLZP6TFS.FFU6QΑΓ
    w $JSDMF$*೔ຊࢧ͕ࣾͰ͖ΔΑ͏Ͱ͢
    w ՝ۚܗଶΛίϯςφ୯Ґैྔ՝੍ۚ
    w 1SPUFDUFE3FTPVSDFT
    w FY
    Ϣʔβ͝ͱʹσϓϩΠՄೳෆՄೳͱ੍͍ͬͨޚ
    w */4*()54ػೳͷڧԽ
    w ༗ޮ׆༻͕ՄೳͳΑ͏ʹػೳվળ
    w ݱࡏ"1*Λ(SBQI2-Λ༻͍ͯॱ࣍։ൃத
    w #:0%SFNPUFEPDLFS౳ͷ7.ىಈΛΦϯϓϨϚγϯͷར༻Մೳ

    View full-size slide