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

iOSのCI環境をゼロから構築

 iOSのCI環境をゼロから構築

「CI/CD Test Night #4」での登壇資料
https://testnight.connpass.com/event/130465/

CI環境を整備した経緯
やったこと
まずはここから整えよう
まとめ

542c2e28f3233259823b4397cd8f498c?s=128

taihei mishima

June 20, 2019
Tweet

Other Decks in Programming

Transcript

  1. J04ͷ$*؀ڥΛθϩ͔Βߏங GBTUMBOF#JUSJTFͰ ౖᔶͷ৽ن։ൃطଘվमΛ৐Γӽ͑Ζ

  2. ࣗݾ঺հ w ࡾౡଠฏ   w גࣜձࣾ7PJDZ ۀ຿ҕୗ  w

    J04ΤϯδχΞ ೥ऑ  w MJLFΞχϝήʔϜαοΧʔ w EJTMJLF஬Նੜ͝Έ !UJIJNTN
  3. גࣜձࣾ7PJDZ w ઃཱ w αʔϏεϦϦʔε w ϘΠεϝσΟΞʮ7PJDZʯ w Ի੠ίϯςϯπ഑৴ϝσΟΞ
 w

    Ի੠Πϯϑϥࣄۀ ʙʮԻ੠ºςΫϊϩδʔʯͰΘ͘Θ͘͢ΔࣾձΛ࡞Δʙ
  4. ໨࣍ w$*؀ڥΛ੔උͨ͠ܦҢ w΍ͬͨ͜ͱ w·ͣ͸͔͜͜Β੔͑Α͏ w·ͱΊ

  5. $*؀ڥΛ੔උͨ͠ܦҢ $*؀ڥͳΜͯͳ͔ͬͨ ʘ ?P? ʗ

  6. Ҏલͷ7PJDZͷσϓϩΠ؀ڥ w ϦϦʔε༻ΞΧ΢ϯτ͕ೖͬͨ.BDͰ͔͠ετΞϦϦʔεͰ͖ͳ͍ w 9DPEFͰͷ"SDIJWF ετΞϓογϡ "QQ4UPSF$POOFDUͰͷϙνϙνͳͲͷ ໘౗ͳखॱΛ஌ͬͯΔਓҎ֎Ͱ͖ͳ͍ w ઀ଓઌͷ"1*ͳͲ

    $POpHVSBUJPOͰ੾Γସ͑Δ΂͖ͱ͜ΖΛखಈͰ੾Γସ͑ ͍ͯͨ w ϒϥϯνʹΑͬͯίʔυ΍ϑΝΠϧͷத਎͕ҧ͏ w 5FTU഑৴ΛผΞϓϦ WPJDZEFWΈ͍ͨͳ ͱͯ͠࡞ͬͯ"QQ4UPSF$POOFDUʹ Ξοϓϩʔυͯͨ͠
  7. ϦχϡʔΞϧ͕ഭͬͯ͘Δ΍͹͍ ࿥ԻΞϓϦͷϑϧϦχϡʔΞϧΛߦ͏Ϧιʔε֬อͷͨΊ  ϕτφϜʹڌ఺Λ࣋ͬͯΦϑγϣΞ։ൃΛߦ͏͜ͱ͕ܾఆ

  8. ৽ن։ൃ͕ഭͬͯ͘Δ΍͹͍ ݱঢ়ͷ։ൃ؀ڥͰେྔͷ13ࡹ͖ͭͭ  ςετ഑৴ͭͭ͠ ίʔυॻ͖ͭͭͱ͔࣮֬ʹແཧ

  9. $*؀ڥΛ੔උͨ͠ܦҢ $*؀ڥ࡞Δͧʂ

  10. ΍ͬͨ͜ͱશ෦ w #JUSJTFGBTUMBOFʹΑΔ %FWFMPQNFOU 4UBHJOH "QQ4UPSF ΁ͷ഑෍ w #VJME$POpHVSBUJPOʹΑΔ؀ڥม ਺ͳͲͷ੾Γସ͑

    w "1* ΞϓϦΞΠίϯ  (PPHMF4FSWJDF*OGPQMJTUFUD w E4:.ϑΝΠϧΛ$SBTIMZUJDT΁ Ξοϓϩʔυ w QPEVQEBUF13 w CVOEMFVQEBUF13 w NBUDIʹΑΔূ໌ॻͷ؅ཧ w %BOHFS4XJGU-JOUʹΑΔϨϏϡʔ ࣗಈԽ w ࣗಈςετ 6OJUΛগ͚ͩ͠  w ୺຤ొ࿥ূ໌ॻߋ৽
  11. ΍ͬͨ͜ͱશ෦ w #JUSJTFGBTUMBOFʹΑΔ %FWFMPQNFOU 4UBHJOH "QQ4UPSF ΁ͷ഑෍ w #VJME$POpHVSBUJPOʹΑΔ؀ڥม ਺ͳͲͷ੾Γସ͑

    w "1* ΞϓϦΞΠίϯ  (PPHMF4FSWJDF*OGPQMJTUFUD w E4:.ϑΝΠϧΛ$SBTIMZUJDT΁ Ξοϓϩʔυ w QPEVQEBUF13 w CVOEMFVQEBUF13 w NBUDIʹΑΔূ໌ॻͷ؅ཧ w %BOHFS4XJGU-JOUʹΑΔϨϏϡʔ ࣗಈԽ w ࣗಈςετ 6OJUΛগ͚ͩ͠  w ୺຤ొ࿥ূ໌ॻߋ৽ ໿ϲ݄
  12. ·ͣ͸͔͜͜Β੔͑Α͏ w #JUSJTFGBTUMBOFʹΑΔ %FWFMPQNFOU 4UBHJOH "QQ4UPSF ΁ͷ഑෍ w #VJME$POpHVSBUJPOʹΑΔ؀ڥม ਺ͳͲͷ੾Γସ͑

    w "1* ΞϓϦΞΠίϯ  (PPHMF4FSWJDF*OGPQMJTUFUD w E4:.ϑΝΠϧΛ$SBTIMZUJDT΁ Ξοϓϩʔυ w QPEVQEBUF13 w CVOEMFVQEBUF13 w NBUDIʹΑΔূ໌ॻͷ؅ཧ w %BOHFS4XJGU-JOUʹΑΔϨϏϡʔ ࣗಈԽ w ࣗಈςετ 6OJUΛগ͚ͩ͠  w ୺຤ొ࿥ূ໌ॻߋ৽
  13. #JUSJTFGBTUMBOFͰ഑෍ࣗಈԽ

  14. #JUSJTFGBTUMBOFͰ഑෍ࣗಈԽ %FWFMPQNFOU EFWFMPQʹ13 4UBHJOH SFMFBTF ʹQVTI

  15. #JUSJTFGBTUMBOFͰ഑෍ࣗಈԽ 1SPEVDUJPO NBTUFSϒϥϯνʹQVTI

  16. #JUSJTFGBTUMBOFͰ഑෍ࣗಈԽ

  17. #JUSJTFGBTUMBOFͰ഑෍ࣗಈԽ $SBTIMZUJDTͱ͍͏ΫϥογϡϨϙʔτΛݟΒΕΔ ػೳͳͲ͕͋ΔαʔϏεͰ͢ ͦͷதͷCFUBͱ͍͏ػೳΛ࢖ͬͯςετΞϓϦͷ ഑৴Λߦͬͯ·͢ 'JSFCBTFʹങऩ͞Εͯঃʑʹ౷߹த ଞͷબ୒ࢶͩͱ%FQMPZ(BUF͕ଟ͍Α͏Ͱ͢

  18. #JUSJTFGBTUMBOFͰ഑෍ࣗಈԽ J04͓Αͼ"OESPJEΞϓϦͷϏϧυ ςετ  σϓϩΠͷࣗಈԽΛॿ͚ΔλεΫϥϯφʔͰ͢ ωΠςΟϒΞϓϦͷ$*؀ڥ࡞ΔͳΒઈର͜ΕೖΕ ͯΔͷͰ͸ͳ͔Ζ͏͔

  19. #JUSJTFGBTUMBOFͰ഑෍ࣗಈԽ ͍ΘΏΔ$*πʔϧͰ͢ $JSDMF$*΍+FOLJOTͰࣗલͰ΍ΔͳͲͷબ୒ࢶ΋ ͋Γ·͕ͨ͠ खܰʹ࢝ΊΔͳΒ#JUSJTF͕ྑ͍ͱ ͍͏ᷚΛฉ͍ͯ#JUSJTFʹ

  20. #VJME$POpHVSBUJPOܥ gym( workspace: “YourApp.xcworkspace”, scheme: “YourApp”, clean: true, configuration: “Release”

    )
  21. #VJME$POpHVSBUJPOܥ gym( workspace: “YourApp.xcworkspace”, scheme: “YourApp”, clean: true, configuration: “Release”

    )
  22. #VJME$POpHVSBUJPOܥ gym( workspace: “YourApp.xcworkspace”, scheme: “YourApp”, clean: true, configuration: “Release”

    ) ɾ"1* ɾ(PPHMF4FSWJDF*OGPQMJTU ɾ3&7&34&%@$-*&/5@*% ɾΞϓϦΞΠίϯ
  23. #VJME$POpHVSBUJPOܥ 4DIFNFΛ؀ڥ͝ͱʹ༻ҙ͠ͱ͘ͱศརͰ͢

  24. ূ໌ॻपΓ J04ͷূ໌ॻ ͲΕ͘Β͍ཧղͯ͠·͔͢

  25. ূ໌ॻपΓ

  26. ূ໌ॻपΓ w$43ϑΝΠϧ wূ໌ॻϑΝΠϧ wQϑΝΠϧ w1SPWJTJPOJOH1SPpMF ࢀߟ: https://qiita.com/bl-lia/items/c6ec88020d526cdb454c

  27. ূ໌ॻपΓ ূ໌ॻ΍1SPWJTJPOJOH1SPpMFͷ࡞੒  ͦΕΒͷ҉߸ԽΛͯ͠(JUIVCϦϙδτϦʹอଘ  ෳ߹Խͯ͠औಘΛ୲ͬͯ͘ΕΔ௒༏लͳࢠ

  28. ূ໌ॻपΓ  JPTDFSUJpDBUFTͷΑ͏ͳ໊લͷQSJWBUFϦϙ δτϦΛ࡞Δ  ূ໌ॻΛ؅ཧ͍ͨ͠ΞϓϦέʔγϣϯͷϦ ϙδτϦͰGBTUMBOFNBUDIJOJU͢Δ  (JUIVCϦϙδτϦͷ63-ΛٻΊΒΕΔͷ Ͱ

    JPTDFSUJpDBUFTϦϙδτϦͷ63-Λࢦఆ ͢Δ  GBTUMBOFNBUDIEFWFMPQNFOUͯ͠ Ϧϙ δτϦʹূ໌ॻΛ҉߸Խͯ͠อଘ  GBTUMBOFNBUDIEFWFMPQNFOUŠSFBEPOMZ Ͱূ໌ॻΛऔಘ
  29. ূ໌ॻपΓ

  30. ূ໌ॻपΓ ͑ ͦΕ͡Ό͋ŠSFBEPOMZ͚ͭ๨ΕͨΒ উखʹূ໌ॻߋ৽͞ΕΔͷͰ͸

  31. ূ໌ॻपΓ ʮઈରʹŠSFBEPOMZ͚ͭͯͶʯ ͬͯݴ͍ฉ͔ͤΔ͜ͱ͕ॏཁ

  32. ূ໌ॻपΓ (JUIVC5FBN

  33. ূ໌ॻपΓ

  34. ূ໌ॻपΓ match( type: “appstore”, app_identifier: “jp.your.app”, readonly: true )

  35. ূ໌ॻपΓ

  36. 4XJGU-JOU%BOHFS

  37. 4XJGU༻ͷ੩తղੳπʔϧͰ͢ ߦ͋ͨΓͷจࣈ਺ ωετͷਂ͞ͳͲΛ ࣗಈͰνΣοΫͯ͘͠Ε·͢ 4XJGU-JOU%BOHFS

  38. %BOHFS4XJGU-JOU 1VMM3FRVFTUͷࢦఠΛࣗಈԽͯ͘͠ΕΔ 4XJGUҎ֎ͷݴޠͰ΋࢖༻Մೳ

  39. 4XJGU-JOU%BOHFS github.dismiss_out_of_range_messages swiftlint.config_file = ‘.swiftlint.yml' swiftlint.lint_files inline_mode: true %BOHFSpMF

  40. 4XJGU-JOU%BOHFS danger 'BTUpMF

  41. 4XJGU-JOU%BOHFS

  42. 4XJGU-JOU%BOHFS

  43. ·ͱΊ w ϛεΛͪ͠Όμϝͳͱ͜Ζ ετΞϦϦʔεূ໌ॻ  w ස౓º࣌ؒ޻਺͕େ͖͍ͱ͜Ζ ςετ഑৴  w

    ίϛϡχέʔγϣϯίετ͕େ͖͍ͱ͜Ζ ূ໌ॻ  w Πϥͬͱͯ͠͠·͍͕ͪͳͱ͜Ζ 4XJGU-JOU%BOHFS
  44. 7PJDZʹ͍ͭͯ w J04ΤϯδχΞืूIUUQTXXXXBOUFEMZDPNQSPKFDUT  RMHB+Q;."CJ5 w 7PJDZ&OHJOFFSJOH#MPHIUUQTNFEJVNDPNWPJDZFOHJOFFSJOH

  45. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠