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

ユビレジiOSアプリ開発のCI/CD環境 / iOS Test Night #1

ユビレジiOSアプリ開発のCI/CD環境 / iOS Test Night #1

Noritaka Kamiya

November 18, 2016
Tweet

More Decks by Noritaka Kamiya

Other Decks in Programming

Transcript

  1. iOS Test Night #1
    @nolili
    Noritaka Kamiya
    ϢϏϨδ iOSΞϓϦ։ൃ
    ͷCI/CD؀ڥ

    View full-size slide

  2. ςετपΓʹؔ͢Δ΋ͷͰ͋Ε͹ԿͰ΋0,Ͱ͢ɻ
    ྫΛ͋͛Δͱ͢Ε͹ҎԼͷΑ͏ͳ΋ͷͳͲͰ͢ɻ
    w ͜ͷςεςΟϯάϑϨʔϜϫʔΫ͸͕͜͜ϋϚΓͲ͜Ζ
    w ςεςΟϯάϑϨʔϜϫʔΫΛ͜͏΍ͬͯ࢖͍෼͚͍ͯΔ
    w ͜͜ͷػೳ͸͜͏΍ͬͯ޻෉ͯ͠ςετ͍ͯ͠Δ
    w ࠓɺ͜ͷ$*͕೤͍
    w $*$%؀ڥΛ͜ͷΑ͏ͳײ͡Ͱ࡞ΓࠐΜͰ͍Δ
    w +FOLJOT৬ਓͷۤ࿑࿩
    iOS Test Night

    View full-size slide

  3. Έͳ͞Μͷ$*$%؀ڥ͸ͲΜͳײ͡Ͱ͔͢ʁ
    ·ͩ΍ͬͯͳ͍
    ࠓ࡞ͬͯΔ
    όϦόϦճͯ͠Δ

    View full-size slide

  4. ϢϏϨδͷCI/CD؀ڥ

    View full-size slide

  5. Travis CI
    UFTUJ04
    ࠷৽ͷJ044JNVMBUPSͰςετ
    UFTUJ04MFHBDZ
    αϙʔτ͍ͯ͠Δݹ͍J044JNVMBUPSͰςετ
    MJOU
    TXJGUMJOUεΫϦϓτ
    EJTUSJCVUJPO
    Ϗϧυɺ഑෍ ಠࣗαʔό

    View full-size slide

  6. Test
    test iOS
    iOS 9.3, iPad Air/iPad 2
    test iOS legacy
    iOS 8.4, iPad Air/iPad 2
    ΞʔΩςΫνϟΛ໢ཏͭͭ͠ɺγϛϡϨʔλ੾Γସ͑࣌ͷτϥϒϧΛ๷͙
    ฒྻ࣮ߦͯ͠ςετ࣌ؒͷ୹ॖ
    XCTest, KIF

    View full-size slide

  7. lint
    swiftlint

    View full-size slide

  8. distribution
    Ad-HocϏϧυΛPull-Request୯ҐͰ࡞੒
    Πϯετʔϧ͙࣮ͯ͢͠ػͰ֬ೝͰ͖Δ
    Releaseλά͕͋Ε͹App Store༻΋࡞੒

    View full-size slide

  9. ͏·͘ճͨ͢Ίʹ৺͕͚͍ͯΔ͜ͱ

    View full-size slide

  10. .travis.yml + Rakefile
    CI/CDͷϑϩʔ͸શͯίʔυʹهड़
    ୭Ͱ΋PRͰվળ͕Ͱ͖Δ
    CI/CDͷվળ΋ίʔυϨϏϡʔ͢Δ͜ͱͰɺଐਓԽ͕ى͖ʹ͘͘ͳΔɻ
    νʔϜ։ൃͰͳ͍৔߹͸ΦʔόʔεϖοΫ͔΋͠Εͳ͍ɻ

    View full-size slide

  11. Cocoapods
    BundlerͰόʔδϣϯΛ؅ཧ
    ./Pods ͸ϦϙδτϦʹؚΊΔ
    Ϗϧυ࣌ͷঢ়ଶΛ෮ݩͰ͖ΔΑ͏ʹ͓ͯ͘͠ɻgit bisect΋ָɻ
    CocoapodsͷόʔδϣϯΛ؅ཧ͢Ε͹ࠩ෼͸ग़ͳ͍ɻ

    View full-size slide

  12. Xcode Server
    ࢼݧతʹಋೖத
    σόΠεςετ
    ιʔείʔυ੩తղੳͰ݈શੑνΣοΫ
    ͓कΓ͕େม .xcodeserver ϑΝΠϧͷΑ͏ͳ΋ͷͰ؅ཧͰ͖ΔΑ͏ʹͳͬͯ΄͍͠…!

    View full-size slide

  13. CIαʔϏε΁ͷґଘΛݮΒ͢
    Fastlane, XCJobs, Rake(Script)
    ڈ೥CircleCI -> Travis CI ͷҾӽ͠Λ2ճ࣮ࢪ

    View full-size slide

  14. iOSͷCI/CD؀ڥ͸1೥ʹ࠷௿1౓յΕΔ
    Xcode iTunes Connect
    มߋʹ௥ै͢ΔίετΛߟ͑Δ
    γϯϓϧʹอͭ
    Ͳͷ͘Β͍࡞ΓࠐΉ͔
    Swiftͷόʔδϣϯ΋བྷΈ࢝ΊΔ
    ࣮͸ࠓյΕ͍ͯͯम෮தɹ"
    ৐Γ׵͑΋ݕ౼த

    View full-size slide

  15. ςετपΓʹؔ͢Δ΋ͷͰ͋Ε͹ԿͰ΋0,Ͱ͢ɻ
    ྫΛ͋͛Δͱ͢Ε͹ҎԼͷΑ͏ͳ΋ͷͳͲͰ͢ɻ
    w ͜ͷςεςΟϯάϑϨʔϜϫʔΫ͸͕͜͜ϋϚΓͲ͜Ζ
    w ςεςΟϯάϑϨʔϜϫʔΫΛ͜͏΍ͬͯ࢖͍෼͚͍ͯΔ
    w ͜͜ͷػೳ͸͜͏΍ͬͯ޻෉ͯ͠ςετ͍ͯ͠Δ
    w ࠓɺ͜ͷ$*͕೤͍
    w $*$%؀ڥΛ͜ͷΑ͏ͳײ͡Ͱ࡞ΓࠐΜͰ͍Δ
    w +FOLJOT৬ਓͷۤ࿑࿩

    View full-size slide

  16. ࠓɺ͜ͷ$*͕೤͍ˠ$*αʔϏεʹґଘ͠ͳ͍࡞ΓΛ
    $*$%؀ڥΛ͜ͷΑ͏ͳײ͡Ͱ࡞ΓࠐΜͰ͍ΔˠγϯϓϧͰɾมߋʹ௥ैΛ
    +FOLJOT৬ਓͷۤ࿑࿩ˠશͯΛϦϙδτϦʹೖΕͯɺ৬ਓΛ࡞Βͳ͍

    View full-size slide

  17. ஌Γ͍ͨ
    CI/CD؀ڥ͸ͲΜͳײ͡Ͱ͔͢?#
    ͲͷλΠϛϯάͰϝϯςφϯε͍ͯ͠·͔͢?

    View full-size slide

  18. iOS Test Night #1
    @nolili
    Noritaka Kamiya
    ϢϏϨδ iOSΞϓϦ։ൃ
    ͷCI/CD؀ڥ

    View full-size slide