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

AbemaTV iOSチームにおける継続的ナントカについて

AbemaTV iOSチームにおける継続的ナントカについて

iOS Test Night #5 での発表資料です!

E2c86baa99178b8400a2ef49ef861a6c?s=128

toshi0383

July 26, 2017
Tweet

Transcript

  1. AbemaTV iOSνʔϜʹ͓͚Δܧ ଓతφϯτΧʹ͍ͭͯ iOS Test Night #5 Jul 26, 2017

    Toshihiro Suzuki © Toshihiro Suzuki 2017 1
  2. whoami — ླ໦ ढ़༟ (@toshi0383) — iOS/tvOS Dev at AbemaTV

    — αόή, F1, ΠϯυΧϨʔ — ৽ถύύ (΋͏͙͢3ϲ݄) © Toshihiro Suzuki 2017 2
  3. tools and apps © Toshihiro Suzuki 2017 3

  4. ࠓ೔͸ CIٴͼ։ൃ؀ڥͷվળΛ௨ͯ͠ಘͨ஌ ݟΛ͓఻͑͠·͢ © Toshihiro Suzuki 2017 4

  5. ݱࡏͷঢ়گ © Toshihiro Suzuki 2017 5

  6. Swi! ໿8ສߦۙ͘ͷίʔυϕʔε ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Swift

    975 15178 10243 77378 © Toshihiro Suzuki 2017 6
  7. 1944 ςετέʔε Executed 1944 tests, with 0 failures (0 unexpected)

    in 16.075 (17.243) seconds © Toshihiro Suzuki 2017 7
  8. DebugϏϧυ࠷଎ه࿥ — 58ඵ (2017೥7݄ࠒ) - ࣗ෼ͷiMac © Toshihiro Suzuki 2017

    8
  9. CIςετ࣮ߦ࠷଎ه࿥ — 2෼51ඵ (2017೥4݄ࠒ) - Jenkins on Mac Pro —

    6෼13ඵ (2017೥7݄ࠒ) - Bitrise Elite VM © Toshihiro Suzuki 2017 9
  10. CI͸΄΅ৗʹάϦʔϯ — ςετέʔεͷमਖ਼๨ΕҎ֎͸΄΅ࣦഊͳ͠ — PR͸ฏۉ10෼ఔ౓(ഽײ֮)ͰϚʔδՄೳͳঢ়ଶʹ — ·͋·͋৺஍Α͍εϐʔυײ © Toshihiro Suzuki

    2017 10
  11. ࢥ͍ฦͤ͹ © Toshihiro Suzuki 2017 11

  12. 2017೥3݄ʹAbemaTVʹjoin © Toshihiro Suzuki 2017 12

  13. ౰࣌νʔϜ๊͕͍͑ͯͨ໰୊ — ֤ࣗखݩͰͷϏϧυ͕10෼Ҏ্͔͔Δ => UIඍमਖ਼ͷΠς Ϩʔγϣϯ଎౓.. — Jenkinsͷςετ͕஗͍ͷͱෆ҆ఆͰͳ͔ͳ͔ϚʔδͰ͖ͳ ͍ =>

    ൒೔ۙ͘ແବʹ͢Δέʔε΋ — Jenkins͕͍ΔMac͕ෆػݏ? => ؀ڥͷϝϯςφϯε࡞ۀ ͰҰ೔௵͢ਓ͕ଓग़ʢओʹࢲʣ © Toshihiro Suzuki 2017 13
  14. ରࡦͱͯ͠΍ͬͨ͜ͱ — ςετͷ҆ఆԽͱߴ଎Խ — CarthageҠߦ — BitriseҠߦ © Toshihiro Suzuki

    2017 14
  15. ରࡦͱͯ͠΍ͬͨ͜ͱ — ςετͷ҆ఆԽͱߴ଎Խ <- — CarthageҠߦ — BitriseҠߦ © Toshihiro

    Suzuki 2017 15
  16. ςετ҆ఆԽͱߴ଎Խ ՝୊ — δϣϒͷ࣮ߦʹ20෼~40෼ — ςετ͕ෆ҆ఆͳ͍ͤͰ͜ΕͷϦτϥΠ͕Կճ΋ଓ͘ — JenkinsͰฒྻ࣮ߦͰ͖ͣɺϏϧυ଴ͪͰେौ଺!" ͜͏͍͏ͷΛͳΜͱ͔͔ͨͬͨ͠ ©

    Toshihiro Suzuki 2017 16
  17. ςετ҆ఆԽͱߴ଎Խ ରࡦ — ඇಉظͷ݁ՌΛ௕͘଴͍ͪ͗ͯͨ͢ͷΛमਖ਼ (10ඵ => 1ඵ) — ίϯύΠϧͷߴ଎Խ (͕͔͔࣌ؒͬͯΔͱ͜Ζ͚ͩܕਪ࿦Λ

    ΍ΊΔ) — 10ճʹ1ճͰ΋ࣦഊ͢Δࢠ͸ϙΠο! (։ൃεϐʔυ > Χό Ϩοδ) — ϏϧυͱςετͦΕͧΕʹλΠϜΞ΢τΛઃఆ (5෼ͱ3෼) © Toshihiro Suzuki 2017 17
  18. ରࡦͱͯ͠΍ͬͨ͜ͱ — ςετͷ҆ఆԽͱߴ଎Խ — CarthageҠߦ <- — BitriseҠߦ © Toshihiro

    Suzuki 2017 18
  19. ͳͥCarthageͳͷ͔ʁ — ݱঢ়ଘࡏ͢ΔϥΠϒϥϦ؅ཧπʔϧͷதͰ͸Ұ൪ߴ଎Խ͠ ΍͍͢. — Ϗϧυͨ͠όΠφϦ΍dSYMͳͲΛίϛοτͯ͠ӡ༻͢Δ͜ ͱͰɺCIͰ͸Ϋϩʔϯ͢Δ͚ͩͰࡁΉ. — ϥΠϒϥϦͷϏϧυ͕஗͍ͷΛͳΜͱ͔͔ͨͬͨ͠ (RxSwift

    1෼ɺProfobufؔ࿈ 2෼) © Toshihiro Suzuki 2017 19
  20. CarthageҠߦͷϋϚΓͲ͜Ζ — ϥΠϒϥϦଆ͕CarthageରԠ͍ͯ͠ͳ͍໰୊ — ϥΠϒϥϦଆͷίʔυʹdebugger౰ͯΒΕͳ͍໰୊ — Info.plistෆ੔߹໰୊ — bcsymbolmapͬͯͳʹ໰୊ —

    ݹ͍bcsymbolmap͕࢒ͬͯ͠·͏໰୊ — dSYMͰ͔͗͢໰୊ © Toshihiro Suzuki 2017 20
  21. ϥΠϒϥϦଆ͕CarthageରԠ͍ͯ͠ͳ͍໰୊ — forkͯ͠ؤுͬͨ. — PRϚʔδͯ͘͠ΕΔέʔε΋͋Δ͕ɺݹ͍όʔδϣϯ࢖͍ ͍ͨ৔߹ͳͲ͸Ͳ͏ͯ͠΋forkΛϝϯς͍ͯ͘͠ඞཁ͋Γ. © Toshihiro Suzuki 2017

    21
  22. ϥΠϒϥϦଆͷίʔυʹdebugger౰ͯΒΕͳ͍໰୊ CarthageΛ࢖ͬͨϑϨΩγϒϧͳ։ൃ؀ڥͷߏங http://qiita.com/toshi0383/items/e932a2fb2f1469bf95eb © Toshihiro Suzuki 2017 22

  23. Info.plistෆ੔߹໰୊ ϥΠϒϥϦͷInfo.plist͕ݪҼͰૺ۰ͨ͠iTunesConnectΞο ϓϩʔυΤϥʔ http://qiita.com/toshi0383/items/6418e70b5c33e2de0d13 CFBundleVersion΍CFBundleShortVersionStringͷ ValidationʹҾ͔͔ͬΔ. ϥΠϒϥϦଆͰͪΌΜͱઃఆͯ͘͠Ε͍ͯΔඞཁ͕͋Δ. © Toshihiro Suzuki

    2017 23
  24. bcsymbolmapͬͯͳʹ໰୊ — Carthage/Build/iOS ҎԼʹੜ੒͞ΕΔ. — bitcode͕༗ޮͳ৔߹ɺdSYMͱͷඥ෇͚ʹ࢖ΘΕΔΒ͍͠. — ͱΓ͋͑ͣίϛοτ͠ͱ͚͹ok. © Toshihiro

    Suzuki 2017 24
  25. ݹ͍bcsymbolmap͕࢒ͬͯ͠·͏໰୊ — carthage update ͸ಛʹݹ͍bcsymbolmapΛ࡟আͯ͘͠Ε ͨΓ͸͠ͳ͍. — Ϟδϡʔϧ໊Ͱgrepͯ͠࡟আ͢ΔࡶͳεΫϦϓτΛॻ͍ͨ Γͯ͠ӡ༻ͰΧόʔ. ©

    Toshihiro Suzuki 2017 25
  26. dSYMͰ͔͗͢໰୊ — GitHubͷϑΝΠϧαΠζ੍ݶ(50MB/1ϑΝΠϧ)ʹҾ͔͔ͬ Δέʔε͋Γ. — ݱঢ়Git LFSͰӡ༻. © Toshihiro Suzuki

    2017 26
  27. ରࡦͱͯ͠΍ͬͨ͜ͱ — ςετͷ҆ఆԽͱߴ଎Խ — CarthageҠߦ — BitriseҠߦ <- © Toshihiro

    Suzuki 2017 27
  28. Bitriseͱ͸ — ׂͱ࠷ۙग़͖ͯͨCIαʔϏε(SaaS) — Android΍Xamarinʹ΋ରԠ — Linux VM΋͋Δ © Toshihiro

    Suzuki 2017 28
  29. ͳͥBitriseʹͨ͠ͷ͔ʁ — Ϗϧυ͕҆ఆͨ͠ͱͯ͠΋ɺͱʹ͔͘Jenkins৬ਓ͕ඞཁͳ ঢ়ଶΛ୤͔ͨͬͨ͠. — ݕূͷ݁ՌɺBitriseͷElite MachineͳΒΪϦΪϦεϖοΫ ͕ؒʹ߹ͬͨ. © Toshihiro

    Suzuki 2017 29
  30. Bitrise Elite MachineͷεϖοΫ Hardware: Hardware Overview: Model Name: Apple device

    Model Identifier: VMware7,1 Processor Speed: 2.58 GHz Number of Processors: 2 Total Number of Cores: 2 L2 Cache (per Processor): 256 KB L3 Cache (per Processor): 30 MB Memory: 8 GB Boot ROM Version: VMW71.00V.0.B64.1506250318 SMC Version (system): 2.8f0 Serial Number (system): VMCpWilpP27U Hardware UUID: 420B563C-BB9B-3762-1FEF-AA73189D7017 ·͋·͋ϋΠεϖοΫͬΆ͍. © Toshihiro Suzuki 2017 30
  31. Bitrise Elite Plan — ·͋·͋ϋΠεϖοΫͳVMΛಉ࣌ʹ3x~ฒྻ࣮ߦՄೳ — ฒྻ਺1ͭ͋ͨΓ$100͕ͩɺx3͕࠷௿ϥΠϯͳͷͰ $300~/ mo ͳ఺ʹ஫ҙ.

    © Toshihiro Suzuki 2017 31
  32. ͪͳΈʹ.. JenkinsΛ࢖͍ଓ͚Δબ୒ࢶ΋͋Γ͑ ͳ͘͸ͳ͔ͬͨ © Toshihiro Suzuki 2017 32

  33. JenkinsͰฒྻγϛϡϨʔλ؀ڥ — Macͷϓϩηε਺ͷ্ݶղ์ (pxctestͷυΩϡϝϯτࢀর) — pxctestͰSimulator.app͸ىಈͤͣʹ࣮ߦ͢Δ͜ͱͰϓϩ ηε਺ͷઅ໿ — ςετͷδϣϒͱЌ഑෍ͷδϣϒͰγϛϡϨʔλΛ෼͚ͯࢦ ఆ

    ࣮ࡍ·͋·͋Α͔ͬͨ. JenkinsΛ࢖͍͜ͳͤ͹΋ͬͱߴ౓ͳ ͜ͱ΋Ͱ͖Δ͸ͣ. © Toshihiro Suzuki 2017 33
  34. BitriseҠߦͷצॴ — Makefileͷઃఆྫ (Bitriseͱ௚઀ؔ܎ͳ͍͚Ͳ) — bitrise.yml © Toshihiro Suzuki 2017

    34
  35. Makefileͷઃఆྫ SHOW_BUILD_SETTINGS=$(XCODEBUILD) $(ENV_VARS) $(OPTIONS) $(DESTINATION) \ -configuration $(CONFIGURATION) \ -showBuildSettings

    BUILD_FOR_TESTING=$(XCODEBUILD) $(ENV_VARS) $(OPTIONS) $(DESTINATION) \ -configuration Test \ build-for-testing TEST_WITHOUT_BUILDING=$(XCODEBUILD) $(ENV_VARS) $(OPTIONS) $(DESTINATION) \ -configuration Test \ test-without-building fastlane scan ͱൺ΂ͨར఺ - ࣮ߦ͕଎͍. - -showBuildSettings ͷग़ྗΛൺֱ͢Δ͜ͱͰϏϧυઃఆͷ ςετ͕Ͱ͖ΔɺͳͲ. © Toshihiro Suzuki 2017 35
  36. bitrise.yml: workflow ϙΠϯτ - circle.yml΍travis.ymlͱҧ͍ɺίϛοτ͠ͳ͍. - δϣϒΛworkflowͱͯ͠ઃఆ͢Δ. - workflow͸stepͷू·Γ. -

    slack΁ͷ௨஌΋؆୯ʹ࣮૷Ͱ͖Δ © Toshihiro Suzuki 2017 36
  37. bitrise.yml: trigger map ϙΠϯτ - Trigger MapͰࡉ͔͘workflowΛࢦఆͰ͖Δ. © Toshihiro Suzuki

    2017 37
  38. Bitriseͷࡉ͔͍৘ใʹ͍ͭͯ͸iOSDCͷCfPʹԠืͨ͠ͷͰ ͜͜Ͱ͸ׂѪ ؾʹͳΔਓ͸ͥͻ֦ࢄͷ΄Ͳ! https://iosdc.jp/2017/node/1469 © Toshihiro Suzuki 2017 38

  39. ࠓ೔࿩ͨ͜͠ͱ — ςετͷ҆ఆԽͱߴ଎Խ — CarthageҠߦ — BitriseҠߦ © Toshihiro Suzuki

    2017 39
  40. End © Toshihiro Suzuki 2017 40

  41. Toshihiro Suzuki Feel free to reach out! Twitter: @toshi0383 GitHub:

    @toshi0383 Qiita: @toshi0383 Email: t.suzuki326@gmail.com © Toshihiro Suzuki 2017 41