CircleCI first-step

CircleCI first-step

81d7473937e0f9443ca3dbb7dcd7b7ff?s=128

Hisashi.Iguchi

April 27, 2018
Tweet

Transcript

  1. $JSDMF$*pSTUTUFQ !IJTBDIJ  'SJ  ͋ͭ·Εʂ$*$%πʔϧେू߹ʂɹDOEKQୈճ !ΦϥΫϧ੨ࢁηϯλʔ

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

    4PGU8BSF&OHJOFFSJO5FTU  w ։ൃޮ཰޲্ͷͨΊͷࣗಈςετͷ։ൃಋೖ w ࣾ಺ఏڙதͷ$JSDMF$*&OUFSQSJTFͷӡ༻อक 
  3. ΞδΣϯμ w جຊ৘ใ w δϣϒͷछผ w ୯Ұδϣϒ w 8PSLqPX w

    ػೳ঺հ w ·ͱΊ w ͓·͚ 
  4. جຊ৘ใ 

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

  6. WFS -JOVY൛ .BD04൛ ϦϦʔε  ग़యɿϑϦʔૉࡐͺͨͦ͘ ࡱӨऀɿ͢͠ͺ͘ 63-IUUQTXXXQBLVUBTPDPNQPTUIUNMʢࢀরʣ

  7. WFSΛ த৺ʹ࿩͠·͢ 

  8. ͳͥͳΒʜ 

  9. 4VOTFUUJOH$JSDMF$* "VHVTU  ग़యɿϑϦʔૉࡐͺͨͦ͘ ࡱӨऀɿ:BNBTIB 63-IUUQTXXXQBLVUBTPDPNQPTUIUNMʢࢀরʣ IUUQTDJSDMFDJDPNCMPHTVOTFUUJOH

  10. 8IBU$JSDMF$* w ެࣜαΠτɿIUUQTDJSDMFDJDPN w -JOVY.BD04ͷ4BB4ܕ$*4FSWJDF w +FOLJOTͱҧ͍Πϯϑϥͷӡ༻อकෆཁɹ˞&OUFSQSJTF൛͸ཁӡ༻อक w (JU)VC #JUCVDLFUͱ࿈ܞ

    w ίϯςφϕʔεͰδϣϒΛ࣮ߦ w δϣϒఆٛϑΝΠϧΛϦϙδτϦ಺ʹ؅ཧ w TUBDLTIBSFͰͷೝ஌౓͸্Ґ w IUUQTTUBDLTIBSFJPDPOUJOVPVTJOUFHSBUJPO 
  11. 1SJDJOH w 1SJDJOHBOE1MBO*OGPSNBUJPO IUUQTDJSDMFDJDPNQSJDJOH  w େ͖͘෼͚ͯλΠϓ w -JOVY.BD04&OUFSQSJTF 

    ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOH
  12. 1SJDJOH-JOVY w ݱࡏ͸ίϯςφ୯ҐͰͷྉۚઃఆ w ࠓޙैྔ՝੍ۚʹมߋ༧ఆͱͷ͜ͱʢมߋ࣌ظ͸ະఆʣ  w 044QSPKFDUͰ͋Ε͹ίϯςφ·Ͱແྉ w ίϯςφແྉ

    w QSJWBUFϦϙδτϦͰ΋ແྉ w  ݄࣌ؒ w ͋ͨΓ ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOHCVJMEMJOVY
  13. 1SJDJOH.BD04 w λΠϓͷྉۚϓϥϯ  w 044QSPKFDU͸EJTDPVOU͋Γʢαϙʔτ΁࿈བྷʣ 'SFF5SJBM XFFL ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOHCVJMEPTY

  14. 1SJDJOH&OUFSQSJTF w Ϣʔβ୯ҐͰͷྉۚઃఆͰ͋Γ೥ؒܖ໿  w .BD04Λར༻͢Δ৔߹͸೥ؒܖ໿Ͱ໰͍߹Θͤ w ίϯςφ୯ҐͰͷܖ໿ w -JOVYWFS

    .BD04WFS ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD1SJDJOHBOE1MBO*OGPSNBUJPO$JSDMF$*63-IUUQTDJSDMFDJDPNQSJDJOHCVJMEFOUFSQSJTF
  15. ొ࿥ w 4JHOJOɿIUUQTDJSDMFDJDPNTJHOVQ w (JU)VC#JUCVDLFU(PPHMFͷΞΧ΢ϯτ  ग़యɿ$JSDMF*OUFSOFU4FSWJDFT *OD4JHOVQ$JSDMF$*63-IUUQTDJSDMFDJDPNTJHOVQ

  16. Ϗϧυ w δϣϒͷఆٛ w ϧʔτͷDJSDMFDJDPOpHZNMʹఆٛ w DG WFS͸ϧʔτ௚ԼͷDJSDMFZNMʹఆٛ w ࣮ߦλΠϛϯά

    w ϦϙδτϦ'PMMPX࣌ w ର৅ϦϙδτϦʹDPNNJUQVTI1VMM3FRVFTU w "1*ܦ༝ 
  17. δϣϒͷछผ 

  18. δϣϒఆٛͷछྨ w ୯Ұδϣϒ w ̍ͭͷCVJMEδϣϒͷΈͰߏ੒ w 8PSLqPX w δϣϒΛ෼ׂͯ͠ఆٛ w

    δϣϒ࣮ߦͰ͸δϣϒίϯςφ઎༗ w ฒྻͰ࣮ߦͤ͞Δ৔߹͸ෳ਺ίϯςφ͕ඞཁ w ࣮ߦॱং΍ґଘؔ܎ͳͲ΋ఆٛ 
  19. δϣϒͷछผ ୯Ұδϣϒ 

  20. ୯Ұδϣϒ 

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

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

  23. ୯Ұδϣϒ  +PCͷఆٛ ɹ࣮ߦλΠϓͱ ɹ࣮ߦεςοϓΛهࡌ

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

    NBDPT w .BD04্Ͱδϣϒ࣮ߦ 
  25. ୯Ұδϣϒ  ࣮ߦλΠϓ ɹEPDLFS ར༻Πϝʔδ ɹHPMBOH

  26. ୯Ұδϣϒ  Πϯσϯτ஫ҙ εϖʔεͭ

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

  28. ୯Ұδϣϒ  ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

  29. ୯Ұδϣϒ  ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

  30. δϣϒͷछผ 8PSLqPX 

  31. 8PSLqPX 

  32. 8PSLqPX     +PCΛͭ෼ׂఆٛ ɹɾDSFBUFDPOUFOU ɹɾEFMFUFDPOUFOU ɹɾVQEBUFDPOUFOU

  33. 8PSLqPX  8PSLqPX+PC໊শ

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

  35. 8PSLqPX  SFRVJSFTͰ ଞ+PCͱͷ ґଘؔ܎Λఆٛ

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

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

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

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

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

  41. 8PSLqPX 

  42. 8PSLqPX  ಉ͡ఆٛΛ Կ౓΋໘౗Ͱ͢Ͷ

  43. 8PSLqPX  ZBNMͷه๏Λ ར༻ͯ͠ఆٛ࡞੒

  44. ػೳ঺հ 

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

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

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ
  47. 44)σόοά w Ϗϧυ࣮ߦதͷίϯςφ΁ϩάΠϯͯ͠σόοά w ϩάΠϯʹ͸(JU)VC΁ొ࿥͍ͯ͠Δ44)ΩʔΛར༻ w Ϗϧυը໘ͷӈ্͔Β44)σόοά࣮ߦՄೳ  44)Λ༗ޮʹ࣮ͯ͠ߦ ਺෼ىಈͨ͠··ͱͳΔ

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ
  48. ௨஌ w Ϣʔβ୯Ґ w &NBJM௨஌ɺ8FC/PUJpDBUJPO w ϓϩδΣΫτ୯Ґ w $IBU/PUJpDBUJPO w

    4MBDL )JQDIBU 'MPXEPDL $BNQpSF *3$ w 4UBUVT#VEHFT w (JU)VCͷର৅ϓϩδΣΫτ΁දࣔՄೳ  ग़యɿ(JU)VCDPNͷαʔϏεը໘ΑΓ
  49. ॊೈͳDBDIFػߏ w SFTUPSF@DBDIFͰऔಘTBWF@DBDIFͰอଘ w ࢦఆQBUITͷ৘ใʹLFZΛ͚ͭͯDBDIFʢجຊతʹDMFBOෆՄʣ w LFZʹ͸WFSTJPO౳Λࣔ͢஋ΛຒΊΔͷ͕ϕετϓϥΫςΟε w औΓग़͢ࡍ͸LFZʹϚον͢Δ৘ใΛऔಘ w

    ೚ҙͷλΠϛϯάͰ೚ҙͷ৘ใΛ֨ೲՄೳ 
  50. ෳ਺ฒྻ࣮ߦ  w ґଘ͕ͳ͚Ε͹ෳ਺৚݅Λ ฒྻ࣮ͯ͠ߦ w SVCZ OPEF w -JOVY.BD04

    ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ
  51. DBDIFͱ8PSLqPX w ґଘؔ܎͕ͳ͍δϣϒΛฒྻ࣮ߦ w +PCؒͰͷσʔλड͚౉͠ w DBDIFΛ׆༻ w QFSTJTU@UP@XPSLTQBDFͰ΋Α͍ 

    δϣϒͷ૯࣮ߦ࣌ؒͷ୹ॖՄೳ
  52. εέδϡʔϧ࣮ߦ w εέδϡʔϧ࣮ߦ΋Մೳ w 8PSLqPXͷδϣϒ w ஫ҙ఺ w 65$Ͱͷهࡌ͕ඞਢ w

    ෼ִ࣮ؒߦͳͲͷදه w      w ໘౗Ͱ΋      ͱهࡌ͕ඞཁ  ࣮ߦ͢Β͞Εͳ͍ ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ
  53. $ 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 ఆٛϑΝΠϧͷ֬ೝ
  54. $JSDMF$*-PDBM$-*  $ circleci build .circleci/config.yml w ϩʔΧϧ࣮ߦ w DPNNJUQVTI͢Δલʹ֬ೝՄೳ

    w ϩʔΧϧ࣮ߦ͸ൃల్্
  55. 1MBOઃఆͱར༻ঢ়گ w 4&55*/(41-"/͔Βίϯςφܖ໿΍ར༻ঢ়گΛ֬ೝ  ར༻ঢ়گ ίϯςφ਺ มߋ ग़యɿ$JSDMF$*ͷαʔϏεը໘ΑΓ

  56. ·ͱΊ w -JOVYͰ͋Ε͹ίϯςφར༻ྉແྉ w 1SJWBUFϦϙδτϦͰ΋ແྉ w 8PSLqPXͰδϣϒ෼ׂ w ґଘؔ܎ͷͳ͍δϣϒΛฒྻ࣮ߦ w

    ॊೈͳDBTIFػߏ͕༗ޮత w ੍ݶ͸͋Δ΋ͷͷϩʔΧϧͰ΋؆қతͳ֬ೝ͕Մೳ 
  57. ࢀߟ w $POpHVSBUJPO3FGFSFODFɿ w IUUQTDJSDMFDJDPNEPDTDPOpHVSBUJPOSFGFSFODF w 4BNQMF w IUUQTDJSDMFDJDPNEPDTFYBNQMFT w

    "1*3FGFSFODF w IUUQTDJSDMFDJDPNEPDTBQJWSFGFSFODF w -PDBM$-* w IUUQTDJSDMFDJDPNEPDTMPDBMDMJ w %JTDVTT w IUUQTEJTDVTTDJSDMFDJDPN 
  58. ͓·͚$JSDMF$*5PLZP6TFS.FFU6QΑΓ w $JSDMF$*೔ຊࢧ͕ࣾͰ͖ΔΑ͏Ͱ͢ w ՝ۚܗଶΛίϯςφ୯Ґैྔ՝੍ۚ w 1SPUFDUFE3FTPVSDFT w FY Ϣʔβ͝ͱʹσϓϩΠՄೳෆՄೳͱ੍͍ͬͨޚ

    w */4*()54ػೳͷڧԽ w ༗ޮ׆༻͕ՄೳͳΑ͏ʹػೳվળ w ݱࡏ"1*Λ(SBQI2-Λ༻͍ͯॱ࣍։ൃத w #:0%SFNPUFEPDLFS౳ͷ7.ىಈΛΦϯϓϨϚγϯͷར༻Մೳ 
  59. )BQQZ$*-JGF