Save 37% off PRO during our Black Friday Sale! »

CI/CDをミニマルに構築する

2594ac7ce91fd7d9a3ce71ca7cc2d0c0?s=47 d_date
October 21, 2021

 CI/CDをミニマルに構築する

iOS Test Tea Time #3

2594ac7ce91fd7d9a3ce71ca7cc2d0c0?s=128

d_date

October 21, 2021
Tweet

Transcript

  1. CI/CDΛϛχϚϧʹߏங͢Δ iOS Test TeaTime #3 Daiki Matsudate @d_date

  2. ͜ͷτʔΫͷείʔϓ ։ൃ؀ڥͷվળ CI/CDͷߏங ςετɾ഑෍ CI/CDͷӡ༻ɾվળ #ଟ෼͜ͷtarappo͞Μ͕࿩͢ Out of Scope CI/CDʹର͢Δߟ͑ํ

  3. Pull Reqeust͝ͱʹBuild / Test͕੒ޭ͠MergeՄೳͰ͋Δ ৗʹmainϒϥϯνͷϏϧυ͕݈߁ ৗʹProduction΁ͷϦϦʔε͕Մೳ https://www.redhat.com/ja/topics/devops/what-is-ci-cd

  4. CI / CD͸ͳͥ೉͍͠ͷ͔ • ੔උ͍ͯ͘͠ΠςϨʔγϣϯ͕௕͍ • Work fl owΛʮॻ͘ʯˠʮಈ͔͢ʯˠʮࣦഊ͢Δʯ·Ͱ͕௕͍ •

    CLI΍σϑΥϧτͰ͸ͳ͍ݴޠͷηοτΞοϓ • ؀ڥม਺ • iOSͷॺ໊ؔ܎͕΍΍͍͜͠ɺ஌͕ࣝݹ͍ • ܦݧ஋͕ಘΒΕʹ͍͘
  5. CI/CDʹର͢Δߟ͑ํ

  6. CI/CDʹର͢Δߟ͑ํ අ༻ରޮՌ • ͓ۚΛ͔͚Ε͹ϚγϯεϖοΫ͕Α͘ͳΓ࣮ߦ͕࣌ؒ࡟ݮ • ࣮ଶʹݟ߹Θͳ͍ߴֹ՝ۚ

  7. CI/CDʹର͢Δߟ͑ํ ࣌ؒରޮՌ • νʔϜਓ਺͕ଟ͍΄ͲޮՌ͸ಘΒΕ΍͍͢ • Work fl owͷमਖ਼ʹΑΓ࡟ݮ͞Ε࣮ͨߦ࣌ؒ • vs.

    मਖ਼͢Δͷʹ͔͔ͬͨ࣌ؒ • ࣮͸ηοτΞοϓΑΓϝϯςφϯεʹ͕͔͔࣌ؒΔ • ߥഇ͢Δ΄Ͳ૲מΓ͸େม
  8. ΍Δ΂͖͜ͱ • γϯϓϧͳߏ੒ʹ͢Δ • ςετͱ഑෍Λͭ͘Δ • ༨༟͕͋Ε͹ϥΠϒϥϦͷΞοϓσʔτΛఆظ࣮ߦ͢Δ

  9. γϯϓϧͳߏ੒ʹ͢Δ

  10. • Swift Package ManagerΛ࢖͏ • XcodeͷSchemeΛ׆༻͢Δ • Automatic Code SigningΛ࢖͏

    • App Store Connect APIΛ࢖͏ • Test FlightͰ഑෍͢Δ Apple PlatformͷCI / CD Best Practice
  11. • SwiftҎ֎ͷݴޠͷηοτΞοϓ͕ෆཁ Swift Package ManagerΛ࢖͏ xcodebuild -resolvePackageDependencies swift package build

  12. https://speakerdeck.com/d_date/swift-package-centered-project-build-and-practice https://www.youtube.com/watch?v=e_T1-XrYf4A

  13. XcodeͷSchemeΛ׆༻͢Δ • Scheme = Target x Con fi guration •

    SchemeΛࢦఆ͢Δ͚ͩͰઃఆΛ੾Γସ͑ΒΕΔ
  14. Automatic Code SigningΛ࢖͏ iOSͷॺ໊ͱ഑෍͸໘౗ • Certi fi cate (Development /

    Production) • Provisioning Pro fi le (Development / Ad hoc / App Store / Enterprise) • Team • Bundle Identi fi er (per environment)
  15. Automatic Code SigningΛ࢖͏ Provisioning Pro fi le͸Dev Portal͔Βऔಘ • Certi

    fi cate (Development / Production) • Provisioning Pro fi le (Development / Ad hoc / App Store / Enterprise) • Team • Bundle Identi fi er (per environment) *fastlane matchͱͷซ༻͸ෆՄ
  16. App Store Connect APIΛ࢖͏ Provisioning Pro fi le͸Dev Portal͔Βऔಘ •

    Certi fi cate (Development / Production) • Provisioning Pro fi le (Development / Ad hoc / App Store / Enterprise) • Team • Bundle Identi fi er (per environment) • API Key
  17. None
  18. Test FlightͰ഑෍͢Δ https://qiita.com/d_date/items/db540e9ed127b1b23e40

  19. ΍Βͳ͍͍ͯ͘͜ͱ • CIͷ࣮ߦ࣌ؒ࡟ݮ • ී௨͸ઐ೚ऀ͸͍ͳ͍ͷͰ (DeNA SWETάϧʔϓΛআ͘ʣ͜͜͸ؤுΒͳ ͍ • νʔϜϝϯόʔ͕ଟ͘ͳ͖ͬͯͯϏϧυ͕࣌ؒ༗ҙʹ৳ͼͨɺδϣϒ͕٧

    ·Γ࢝ΊͨΒରࡦ͢Δ • ʢա౓ͳʣڞ௨Խ • ࢖͏͔Ͳ͏͔Θ͔Βͳ͍΋ͷ
  20. ςετͱ഑෍Λͭ͘Δ

  21. None
  22. None
  23. None
  24. ༨༟͕͋Ε͹ϥΠϒϥϦͷߋ৽

  25. ༨༟͕͋Ε͹ϥΠϒϥϦͷߋ৽ • dependabotͷઃఆʢSwift͸ରԠதʣ • Bitrise / GitHub ActionsͰिҰճϏϧυΛճ͢ • Package.resolvedΛࣺͯͨΒ͏·͍͘͘͸ͣ

  26. Flutterͷ৔߹ ʢ༨༟͕͋Ε͹Voice Onlyʣ

  27. ·ͱΊ • ϛχϚϜʹߏங͍ͯ͘͠ • ͦ͏͢Δͱͪΐͬͱͣͭվળ͕͠΍͘͢ͳΔ • ඞཁͳ͜ͱ͚ͩΛ΍ΔʢYAGNIʣ

  28. References • https://qiita.com/d_date/items/a06b5661101460851f4c • https://qiita.com/d_date/items/db540e9ed127b1b23e40 • https://speakerdeck.com/d_date/swift-package-centered-project-build-and- practice • https://www.youtube.com/watch?v=e_T1-XrYf4A