リリース自動化の導入と効率の良いリリースフローを求めて

 リリース自動化の導入と効率の良いリリースフローを求めて

@DroidKaigi2017 Day.1
by Ryo Sakaguchi (wakwa3125)

90ec81078e4fd2b905f8ef0776887afa?s=128

Ryo Sakaguchi

March 09, 2017
Tweet

Transcript

  1. ϦϦʔεࣗಈԽͷಋೖͱ ޮ཰ͷΑ͍ϦϦʔεϑϩʔΛٻΊͯ by Ryo Sakaguchi @Droidkaigi2017 Day.1

  2. About me • Θ͘Θ͘͞Μͱ͔ݺ͹Εͯ ·͢ɻ(ձࣾͰͷ෍ڭʹ͸ࣦ ഊͨ͠) • Wantedly! ͱ͍͏ձࣾͰ Wantedly

    Peopleͷ։ൃΛ ͍ͯ͠·͢ɻ • ݩ͓ͶͩΜҎ্ͳՈ۩԰͞ ΜͰൢചһΛ͍ͯ͠·͠ ͨɻ
  3. Agenda

  4. Agenda • ࣗಈԽͷงғؾ • ໨త΍ϞνϕʔγϣϯɺͰ͖Δ͜ͱɺϝϦοτͳͲ • ϦϦʔεࣗಈԽʹؔ࿈͢Δπʔϧͷ঺հ • AndroidΞϓϦͷϦϦʔεͷࣗಈԽʹ໾ʹཱͭπʔϧ܈Λ঺հ͠·͢ɻ •

    Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖ४උʣ • ͍͔ͭ͘ͷϓϩδΣΫτΛྫʹɺࣗಈԽͨ͠ϦϦʔεϑϩʔΛಋೖ͢Δ͜ͱΛߟ͑ͯ Έ·͢ɻ • Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖʣ • ࣮ࡍʹಋೖ͢Δࡍʹඞཁͳ࡞ۀΛνΣοΫ͍͖ͯ͠·͢ɻ • ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺ • ·ͱΊతͳ • ࣭ٙԠ౴
  5. ࠓ೔Ұ൪఻͍͑ͨ͜ͱ • ࣗಈԽͷৄࡉͳಋೖखॱͳͲͰ͸ͳ͘ɺͳΜͰ ΍Δͷ͔ɺϞνϕʔγϣϯΛϝΠϯʹ఻͍͑ͯ ͖͍ͨͱࢥ͍·͢ɻ • ಋೖࣗମ͸ରͯ͠೉͘͠ͳ͍ɻ • ඞཁͳͷ͸΍͍ͬͯ͘ؾ࣋ͪ

  6. Agenda • ࣗಈԽͷงғؾ • ໨త΍ϞνϕʔγϣϯɺͰ͖Δ͜ͱɺϝϦοτͳͲ • ϦϦʔεࣗಈԽʹؔ࿈͢Δπʔϧͷ঺հ • AndroidΞϓϦͷϦϦʔεͷࣗಈԽʹ໾ʹཱͭπʔϧ܈Λ঺հ͠·͢ɻ •

    Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖ४උʣ • ͍͔ͭ͘ͷϓϩδΣΫτΛྫʹɺࣗಈԽͨ͠ϦϦʔεϑϩʔΛಋೖ͢Δ͜ͱΛߟ͑ͯ Έ·͢ɻ • Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖʣ • ࣮ࡍʹಋೖ͢Δࡍʹඞཁͳ࡞ۀΛνΣοΫ͍͖ͯ͠·͢ɻ • ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺ • ·ͱΊతͳ • ࣭ٙԠ౴
  7. ͦ΋ͦ΋ࣗಈԽͷ໨తͬͯʁ

  8. ࣗಈԽͷ໨త • ϧʔνϯϫʔΫɺఆܕ࡞ۀͷΑ͏ͳ΋ͷͳͷͰɺ ࣗಈԽ͢Δ͜ͱʹΑͬͯɺຊ࣭తͳۀ຿ʹूதͰ ͖ΔΑ͏ʹ͍ͨ͠ɻ • ؅ཧ͍ͯ͠ΔΞϓϦ͕ଟ͘ͳ͖ͬͯͨΓɺετΞ ܝࡌจͷଟݴޠରԠͳͲΛ͍ͯ͠Δ৔߹ɺߋ৽ख ॱ͕൥ࡶʹͳΔɻ •

    ͦͷϛεΛݮΒ͍ͨ͠ɻ • ϦϦʔε࡞ۀΛଐਓԽͤͨ͘͞ͳ͍ɻ
  9. ͜Μͳ͜ͱ͕Ͱ͖·͢

  10. ͜Μͳ͜ͱ͕Մೳʹ • Google Play Developer Console΁ͷAPKΞοϓϩʔυ(ෳ ਺APKͷҰׅΞοϓϩʔυ΋OKʂ) • ετΞ৘ใͷߋ৽ •

    Change log • Long description • Short description • ScreenShots • ؂ࢹπʔϧ(Crashlytics΍Firebase Crash Reporting, Bugsnag…) ΁ͷmapping.txtϑΝΠϧͷΞοϓϩʔυ
  11. ΋ͬͱ͍Ζ͍ΖͰ͖ΔΑ͏ʹͳΔ͚Ͳ ΍Γա͗͸ྑ͘ͳ͍͔Β஫ҙɻ (ޙड़)

  12. ࣗಈԽͨ͠ΒԿ͕͏Ε͘͠ͳΔ͔!

  13. ࡞ۀ͕γϯϓϧʹͳͬͯ͏Ε͍͠ʂ

  14. ࣗಈԽ͍ͯ͠ͳ͍ϦϦʔε࡞ۀ͸ ΦϖϨʔγϣϯϛεΛੜΈ͕ͪ

  15. ࠓ·ͰͷϦϦʔε࡞ۀ • ॺ໊ϑΝΠϧΛ͍࣋ͬͯΔϦϦʔεϚωδϟʔతͳਓʹϦϦ ʔεΛ͓ئ͍͢Δɻ • ProductionAPKΛ༻ҙ͢Δɻ • ΞοϓσʔτจΛ༻ҙ͢Δɻ • ConsoleʹΞΫηεͯ͠ɺWEBΠϯλʔϑΣΠεͰΞοϓϩʔ

    υ͢Δ • ΞοϓϩʔυΛࣾ಺ʹप஌ • ߋ৽Λࣾ಺ʹ௨஌ Λશ෦ख࡞ۀ
  16. None
  17. ͜Ε͔ΒͷϦϦʔε࡞ۀ

  18. git push origin master

  19. None
  20. ͸΍͍

  21. ͍͍ͩͨ͜ΕͰ͍͚Δɻ ͜ΕͳΒ…

  22. ϛεͳ͘οʂ εϐʔσΟʹοʂ ϦϦʔεΛճͤΔοʂ

  23. Ͱ΋ϦϦʔε࡞ۀͬͯͦΜͳʹճ਺ଟ͘ͳ͍Μ͡Ό...

  24. ͦΕ͕ɺΞϓϦͷվળαΠΫϧΛ ि1Ͱճ͢ͱ݁ߏେมͰ͢

  25. ͳͥେม͔ • ϦϦʔεΛߴ଎Ͱճ͍ͯ͘͠ͱͲ͏ͯ͠΋όά͕૿͍͑ͯ͘ɻ • ࠜຊతͳղܾࡦͱͯ͠͸ɺ͖ͪΜͱςετΛॻ͍ͯͦ΋ͦ ΋όάΛੜΈʹ͍͘؀ڥΛ੔͑Δ͜ͱ͕ඞཁɻ • Ͱ΋ɺى͖Δͱ͖͸ى͖Δɻ • ݁ՌతʹhotfixΛ͢Δ͜ͱ΋͋Δ

    • ͦͷhotfixΛؚΊΔͱिʹ1ճ͡Ό͢·ͳ͍ • ͦΜͳ࣌ɺϦϦʔε͕Ͱ͖Δ࡞ۀऀ͕1ਓͩͬͨΒʁ ͱ͔΍ͬͯΔͱ࣮֬ʹϛε͕૿͍͑ͯ͘
  26. ࣮ࡍʹ๻ࣗ਎͕΍ͬͯ͠·ͬͨ͜ͱҰཡ • ετΞͷChangelogͷ೔ຊޠʹӳޠΛӳޠʹ ೔ຊޠΛೖΕͯ͠·ͬͨ • APKΛsplit͍ͯͨ͠ͷͰɺԿճ͔͢ͰʹΞοϓ ϩʔυࡁΈͷAPKϑΝΠϧΛΞοϓϩʔυͯ͠ ͠·ͬͨ(஄͔ΕΔͷͰ࣮֐͸ͳ͍) ΫϦςΟΧϧ͗͢Δϛε͸൜ͯ͠ͳ͍͚Ͳɺ΋͏ Ұ౓ؔ࿈࡞ۀ͠ͳ͚Ε͹͍͚ͳ͍ετϨε͸݁ߏ

    ͋ͬͨɻ
  27. ͦΜͳ࣌ʹग़ձͬͨͷ͕ࣗಈԽͰͨ͠ɻ

  28. Agenda • ࣗಈԽͷงғؾ • ໨త΍ϞνϕʔγϣϯɺͰ͖Δ͜ͱɺϝϦοτͳͲ • ϦϦʔεࣗಈԽʹؔ࿈͢Δπʔϧͷ঺հ • AndroidΞϓϦͷϦϦʔεͷࣗಈԽʹ໾ʹཱͭπʔϧ܈Λ঺հ͠·͢ɻ •

    Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖ४උʣ • ͍͔ͭ͘ͷϓϩδΣΫτΛྫʹɺࣗಈԽͨ͠ϦϦʔεϑϩʔΛಋೖ͢Δ͜ͱΛߟ͑ͯ Έ·͢ɻ • Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖʣ • ࣮ࡍʹಋೖ͢Δࡍʹඞཁͳ࡞ۀΛνΣοΫ͍͖ͯ͠·͢ɻ • ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺ • ·ͱΊతͳ • ࣭ٙԠ౴
  29. ࣗಈԽʹඞཁͳπʔϧ܈

  30. ૝ఆ؀ڥ • GitFlowΛ࢖͍ͬͯΔ • master(ϦϦʔεϒϥϯν) • develop • feature •

    hotfix • release • ݸਓɾνʔϜ͸໰Θͳ͍
  31. CI

  32. Wercker͔Bitrise͕Φεεϝ

  33. CI • Wercker 1. DockerͰίϯςφΛ޷͖ʹ࡞ͬ ͯϏϧυ؀ڥΛ͔ͳΓࣗ༝ʹ૊ ΈཱͯΔ͜ͱ͕Ͱ͖Δ • Dockerfile͕ॻ͚Ε͹޷͖ʹ ࡞ΕΔ

    2. ଞʹ΋͢Ͱʹग़དྷ্͕͍ͬͯΔ ίϯςφΛ࢖͏͜ͱ΋Ͱ͖Δɻ 3. ͸΍͍ 4. αϙʔτ͕ϑϥϯΫͳؾ͕͢ Δɻ 5. ͍͍ͩͨແྉ
  34. CI • Bitrise 1. ͳΜͱͳ͘iOSͷΠϝʔδ͕ڧ͍͔ ΋͠Εͳ͍͚Ͳɺandroidͷαϙʔ τ΋εΰΠ͔ͬ͠Γ͍ͯ͠Δɻ 2. ͍͍ͩͨجຊతʹ͸GUIͰ׬݁Ͱ͖ ΔͷͰɺͪΐͬͱमਖ਼͍ͨ͠ͱ͖

    ͱ͔ศར 3. WEBͷίϯιʔϧ͔ΒϏϧυΛε έδϡʔϧͯ͠ୟ͘͜ͱ΋Ͱ͖Δɻ 4. ͔ͬ͠Γ࢖͏ͳΒ༗ྉ͚ͩͲɺ੍ ݶ෇͖ͷແྉϓϥϯ΋͋Δɻ 5. ໘౗ͳॺ໊ϑΝΠϧͷ؅ཧΛखॿ ͚ͯ͘͠ΕΔ
  35. CI Ͳ͕͍͍ͬͪͷʁ • ؀ڥߏஙͱϏϧυϑϩʔͷߏஙͷ͠΍͢͞Ͱ͸ Bitriseʹ܉഑্͕͕Γ·͢ɻ • ॊೈੑͱݴ͏؍఺Ͱ͸Wercker͔ͳ͊ͱࢥͬͯ ͍Δɻ

  36. APKͷΞοϓϩʔυ

  37. APKͷΞοϓϩʔυ • ༗໊ॴ͕2ͭ͋Γ·͢ɻ 1. Triple-T/gradle-play-publisher 2. fastlane/fastlane

  38. ࡶʹൺֱͯ͠Έ·ͨ͠

  39. ൺֱ͸͠·͚ͨ͠Ͳ Έͳ͞Μ͕͓ؾ͖ͮͷΑ͏ʹେࠩ͸͋Γ·ͤΜɻ ͲͪΒͰ΋޷͖ͳํΛ࢖͑͹͍͍ͱࢥ͍·͢ɻ కΓͷѱ͍ൺֱʹͳͬͯ͠·͍·ͨ͠…

  40. Ͱ͕͢

  41. fastlaneͱ͍͑͹fablic fablicͱ͍͑͹

  42. Fabric is Joining Google — January 18, 2017

  43. Ͱ͢ΑͶʁ

  44. fastlane is Joining Google — January 23, 2017

  45. ࠓޙʹظ଴ʂ

  46. ͦͷଞͷπʔϧ

  47. ͦͷଞͷπʔϧ • Tonkotsu • GooglePlayͷߋ৽ΛSlackʹ௨஌ʂ • PlayConsoleΞϓϦΛೖΕͯͳ͍ਓ΍ࣾ಺ʹ ௨஌͢Δͱ͖ͱ͔ʹͱͯ΋໾ཱͪ·͢ɻ

  48. ͍͍ͩͨ͜ͷπʔϧ͚ͩͰࣗಈԽΛ࣮ફ͢Δ͜ͱ͕Ͱ͖·͢ɻ

  49. Agenda • ࣗಈԽͷงғؾ • ໨త΍ϞνϕʔγϣϯɺͰ͖Δ͜ͱɺϝϦοτͳͲ • ϦϦʔεࣗಈԽʹؔ࿈͢Δπʔϧͷ঺հ • AndroidΞϓϦͷϦϦʔεͷࣗಈԽʹ໾ʹཱͭπʔϧ܈Λ঺հ͠·͢ɻ •

    Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖ४උʣ • ͍͔ͭ͘ͷϓϩδΣΫτΛྫʹɺࣗಈԽͨ͠ϦϦʔεϑϩʔΛಋೖ͢Δ͜ͱΛߟ͑ͯ Έ·͢ɻ • Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖʣ • ࣮ࡍʹಋೖ͢Δࡍʹඞཁͳ࡞ۀΛνΣοΫ͍͖ͯ͠·͢ɻ • ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺ • ·ͱΊతͳ • ࣭ٙԠ౴
  50. ಋೖ४උฤ

  51. ͦͷࣗಈԽ΄Μͱ͏ʹඞཁͰ͔͢ʁ

  52. ຊ౰ʹඞཁͰ͔͢ʁ • ͳͥࣗಈԽ͢Δͷ͔ • ͜Εʹ͍ͭͯಥ͖٧Ίͯߟ͍͑ͯ͘ͱ࣮ࡍ͸͠ͳͯ͘΋͍͍έʔ ε͸ଘࡏ͠·͢ɻ • ԿΛͲ͏ࣗಈԽ͢Δ͔͕ࣗͣͱݟ͖͑ͯ·͢ɻ • ͦΕ͕Ͱ͖ͨΒಋೖ४උ͕ऴͬͨΈ͍ͨͳ΋ΜͰ͢ɻ

    • ࣗಈԽ͢ΔϝϦοτ͕͋Δͳɺͱײͨ͡Β࣮ࡍʹ࡞ۀʹͱΓ͔͔ Γ·͠ΐ͏ɻ • ϝϦοτ͕ײ͡ΒΕͨΒɺʮfoobar͔ͩΒࣗಈԽ͍ͨ͠ɻ͔ͩ Βগ࣌ؒ͘͠Εʯతͳ͓࿩ΛνʔϜͰ͢Δͱྑ͍ͱࢥ͍·͢ɻ • ݸਓͳΒؾʹͤͣ΍ͬͯ͠·͍·͠ΐ͏ɻ
  53. Case.1

  54. Case.1 ׬શʹࠃ಺޲͚ͷέʔε

  55. Case.1 ׬શʹࠃ಺޲͚ͷέʔε → ৔߹ʹΑͬͯ͸ࣗಈԽ͠ͳͯ͘΋ྑ͍

  56. Case.1 ͳ͔ͥʁ • ϦϦʔεʹ͔͔Δෛ୲͕ͦ͜·Ͱେ͖͘ͳ͍ͱ ૝ఆͰ͖ΔͨΊɻ • ଟݴޠରԠ࣌ʹଟ͘ͷΞοϓσʔτจΛॻ ͘ඞཁ͕͋Δ͕ɺ׬શࠃ಺޲͚ͷ৔߹͸ͦ ͷ޻਺͕͔͔Βͳ͍ɻ

  57. Case.2

  58. Case.2 άϩʔόϧʹల։͍ͯͯ͠ϩʔΧϥΠζ΋๛෋ͳ ΞϓϦ

  59. Case.2 άϩʔόϧʹల։͍ͯͯ͠ϩʔΧϥΠζ΋๛෋ͳ ΞϓϦ → ͥͻࣗಈԽ͍ͨ͠

  60. Case.2 ͳ͔ͥʁ • ΞοϓσʔτจΛԹ͔Έͷ͋Δख࡞ۀͰ܁Γฦ͠ ͍ͯ͘ඞཁ͕͋Δɻ • ਖ਼௚͔ͳΓͭΒ͍ɻ • APKͷΞοϓϩʔυ͚ͩͰ͸ͳ͘ετΞ৘ใͷߋ ৽΋ຊ౰ʹԯ߷ʹͳΔɻ

    • 14ݴޠ x 5ຕͷεΫϦʔϯγϣοτΛΞοϓϩʔυ ͢Δ͜ͱ͕͋ͬͨΒͲ͏͠Α͏ɻ
  61. Case.3

  62. Case.3 ओʹࠃ಺޲͚ɺ͚ͩͲNDKΛ࢖ͬͨΓɺRealm Λ࢖ͬͨΓ͍ͯ͠Δ৔߹

  63. Case.3 ओʹࠃ಺޲͚ɺ͚ͩͲNDKΛ࢖ͬͨΓɺRealm Λ࢖ͬͨΓ͍ͯ͠Δ৔߹ → APK SplitΛͯ͠ɺΞϓϦαΠζΛ࡟ݮ͍ͯ͠ Δ৔߹͸ͱͬͯ΋ޮՌతͰ͢

  64. APK Splitʁ

  65. APK Splitʁ splits { abi { enable true reset() include

    'x86', 'armeabi', 'armeabi-v7a' universalApk false // trueʹ͢Δͱ෼ղͨ͠APKͷଞʹ // ࠓ·ͰϏϧυ͍ͯͨ͠APK΋ग़ྗ͞Ε·͢ɻ // fablic΍DeployGateʹΞοϓϩʔυ͢ΔࡍʹޮՌత } }
  66. Case.3 ͳͥSplit͍ͯ͠Δͱ͖͸ޮՌత͔ʁ

  67. Case.3 ͳͥSplit͍ͯ͠Δͱ͖͸ޮՌత͔ʁ → ΞϓϦ͕ෳ਺ʹ෼͔Ε·͢ɻ ্هͷྫͩͱuniversalAPKΛআ͍ͯ3ͭͷAPK͕ग़དྷ্͕Γ·͢ɻ ͜ΜͳΜ͍͍ͪͪखͰϙνϙν΍ͬͯΒΕ·ͤΜɻ ͳͷͰࣗಈͰΞοϓϩʔυָͯ͠Λ͍ͯ͜͠͏ͱݴ͏ελΠϧͰ͢ɻ ΞϓϦͷαΠζ͸ࠃ಺ͩͱͦ͏Ͱ΋ແ͍͔΋͠Ε·ͤΜ͕ɺւ֎ͩͱܧଓ཰ʹӨڹ͠·͢ɻ ͳͷͰ΋֘͠౰͞ΕΔਓ͕͍Βͬ͠ΌͬͨΒͥͻಋೖͯ͠Έ͍ͯͩ͘͞ʂ

  68. Agenda • ࣗಈԽͷงғؾ • ໨త΍ϞνϕʔγϣϯɺͰ͖Δ͜ͱɺϝϦοτͳͲ • ϦϦʔεࣗಈԽʹؔ࿈͢Δπʔϧͷ঺հ • AndroidΞϓϦͷϦϦʔεͷࣗಈԽʹ໾ʹཱͭπʔϧ܈Λ঺հ͠·͢ɻ •

    Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖ४උʣ • ͍͔ͭ͘ͷϓϩδΣΫτΛྫʹɺࣗಈԽͨ͠ϦϦʔεϑϩʔΛಋೖ͢Δ͜ͱΛߟ͑ͯ Έ·͢ɻ • Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖʣ • ࣮ࡍʹಋೖ͢Δࡍʹඞཁͳ࡞ۀΛνΣοΫ͍͖ͯ͠·͢ɻ • ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺ • ·ͱΊతͳ • ࣭ٙԠ౴
  69. ಋೖฤ

  70. ࣮ࡍʹखॱͱίʔυͰಋೖ͔Β഑৴·ͰΛ௥͍͖ͬͯ·͠ΐ͏ʂ

  71. ࠓճͷཁ݅(͋͘·Ͱ΋૝ఆͰ͢) • ঢ়گ • ͋ͳͨ͸5ਓͰߏ੒͞Εͨ։ൃνʔϜͷAndroidΤϯδχΞͰ ͢ɻ • ΞϓϦ͸ࠃࡍల։͓ͯ͠Γɺ຋༁΋֎෦ʹґཔ͍ͯͨ͠Γ͠· ͢ɻ •

    ͜ͷ1ϲ݄ɺαʔϏεάϩʔεͷͨΊʹɺ1िؒʹ1ճͷϦϦʔε αΠΫϧΛճ͍ͯ͘͠ࣄʹͳΓ·ͨ͠ɻ • νʔϜʹ͸ϏδωεαΠυͷਓ΋ډ·͢ɻ·ͨɺCSνʔϜ͔Β ͸ϦϦʔε͕͞ΕͨΒ͍ͪૣ͘ڭ͑ͯ΄͍͠ͱݴΘΕ͍ͯ·͢ɻ • ΞϓϦ಺ͷDBʹ͸RealmΛ࢖༻͍ͯ͠·͢ɻ
  72. Թ͔Έͷ͋Δख࡞ۀ(1/3) • ϦϦʔεલʹͳΓɺࠓճͷΞοϓσʔτจΛߟ͑ɺ10ݴޠ ෼ͷ຋༁ґཔΛग़͠·ͨ͠ɻ • ຋༁Λ଴ͭؒɺ࠷ऴ֬ೝͷςετΛߦ͍·ͨ͠ɻ • ςετ׬ྃޙɺAPKΛϏϧυ͠·ͨ͠ɻ • ຋༁͕͞ΕͨΞοϓσʔτจ͢΂͕ͯखݩʹἧ͍·ͨ͠ɻ

    • ͍͟ΞοϓϩʔυͰ͢ɻ • ΞϓϦαΠζͷංେԽΛ཈੍͢ΔͨΊʹɺAPK splitΛ࢖͏ ͜ͱʹͨ͠ͷͰɺશ෦Ͱ5ͭͷAPKΛΞοϓϩʔυ͢Δ͜ͱ ʹͳΓ·ͨ͠ɻ
  73. Թ͔Έͷ͋Δख࡞ۀ(2/3) • GooglePlay Developer Console΁ΞΫηε͠ ·͢ɻ • APKΛΞοϓϩʔυ͠(x5)ɺ֤ݴޠ͝ͱʹΞο ϓσʔτจΛίϐϖ͍͖ͯ͠·͢(x10)ɻ •

    ͍͟ެ։ϘλϯΛԡ͠·͢ʂ
  74. • GooglePlay Developer Console΁ΞΫηε͠ ·͢ɻ • APKΛΞοϓϩʔυ͠(x5)ɺ֤ݴޠ͝ͱʹΞο ϓσʔτจΛίϐϖ͍͖ͯ͠·͢(x10)ɻ • ͍͟ެ։ϘλϯΛԡ͠·͢ʂ

  75. APKΛΞοϓϩʔυ͠(x5) ΞοϓσʔτจΛೖྗ͠·͢(x10)

  76. Թ͔Έͷ͋Δख࡞ۀ(3/3) • APKΛΞοϓϩʔυޙɺCSνʔϜͱ։ൃνʔϜ ʹʮΞοϓϩʔυ͕׬ྃ͠·ͨ͠ʯͱप஌͠· ͢ɻ • ετΞͷߋ৽ΛPlayConsoleΞϓϦͷ௨஌Ͱ֬ ೝͰ͖ͨͷͰɺCSνʔϜʹ΋͏Ұ౓࿈ܞ͠· ͢ɻ

  77. ݁ߏେมײ͋Δɻ

  78. Ͱ͸ࣗಈԽ͢ΔͱͲ͏ͳΔ͔

  79. ࠓճ͸αΫοͱͰ͖ΔࣗಈԽͰߟ͍͑ͨͱࢥ͍·͢ɻ 1. GooglePlay Developer Console΁ΞΫηε͠ ·͢ɻ → ͢΂ͯϩʔΧϧͰ४උ&׬݁͠·͠ΐ͏ by fastlane

  80. ࠓճ͸αΫοͱͰ͖ΔࣗಈԽͰߟ͍͑ͨͱࢥ͍·͢ɻ 1. GooglePlay Developer Console΁ΞΫηε͠ ·͢ɻ → ͢΂ͯϩʔΧϧͰ४උ&׬݁͠·͠ΐ͏ by fastlane

    2. APKΛΞοϓϩʔυ͠(x5)ɺ֤ݴޠ͝ͱʹΞο ϓσʔτจΛίϐϖ͍͖ͯ͠·͢(x10)ɻ → ϓϩάϥϜʹ೚ͤ·͠ΐ͏ by fastlane && CI
  81. ࠓճ͸αΫοͱͰ͖ΔࣗಈԽͰߟ͍͑ͨͱࢥ͍·͢ɻ 1. GooglePlay Developer Console΁ΞΫηε͠·͢ɻ → ͢΂ͯϩʔΧϧͰ४උ&׬݁͠·͠ΐ͏ by fastlane 2.

    APKΛΞοϓϩʔυ͠(x5)ɺ֤ݴޠ͝ͱʹΞοϓσʔτจΛ ίϐϖ͍͖ͯ͠·͢(x10)ɻ → ϓϩάϥϜʹ೚ͤ·͠ΐ͏ by fastlane && CI 3. APKΛΞοϓϩʔυޙɺCSνʔϜͱ։ൃνʔϜʹʮΞοϓ ϩʔυ͕׬ྃ͠·ͨ͠ʯͱप஌͠·͢ɻ → SlackͰࣗಈతʹ௨஌͢Δ࢓૊ΈΛ࡞Γ·͠ΐ͏ by Slack & CI
  82. ࠓճ͸αΫοͱͰ͖ΔࣗಈԽͰߟ͍͑ͨͱࢥ͍·͢ɻ 1. GooglePlay Developer Console΁ΞΫηε͠·͢ɻ → ͢΂ͯϩʔΧϧͰ४උ&׬݁͠·͠ΐ͏ by fastlane 2.

    APKΛΞοϓϩʔυ͠(x5)ɺ֤ݴޠ͝ͱʹΞοϓσʔτจΛίϐϖ͍͖ͯ͠· ͢(x10)ɻ → ϓϩάϥϜʹ೚ͤ·͠ΐ͏ by fastlane && CI 3. APKΛΞοϓϩʔυޙɺCSνʔϜͱ։ൃνʔϜʹʮΞοϓϩʔυ͕׬ྃ͠· ͨ͠ʯͱप஌͠·͢ɻ → SlackͰࣗಈతʹ௨஌͢Δ࢓૊ΈΛ࡞Γ·͠ΐ͏ by Slack & CI 4. ετΞͷߋ৽ΛPlayConsoleΞϓϦͷ௨஌Ͱ֬ೝͰ͖ͨͷͰɺCSνʔϜʹ΋ ͏Ұ౓࿈ܞ͠·͢ɻ → ͪ͜Β΋SlackͰࣗಈతʹ௨஌͢Δ࢓૊ΈΛ࡞Γ·͠ΐ͏ by tonkotsu
  83. ͜Ε͚ͩͰ΋͍ͩͿָʹͳΓ ·͢Αʂ Ͱ͸࣮ݱ͍͖ͯ͠·͠ΐ͏ɻ

  84. Step.1(1/2) ·ͣ͸fastlaneͷ४උ͔Β • fastlane͕GooglePlay Developer ConsoleʹΞ Ϋηε͢ΔͨΊͷService AccountΛ࡞Γɺੜ ੒͞ΕΔjsonϑΝΠϧΛ༻ҙ͠·͢ɻ •

    ࣍ʹfastlaneͷΠϯετʔϧΛߦ͍·͢ɻ gem install fastlane
  85. Step.1(2/3) • fastlaneΛ࢖ͬͯGoogelPlay͔Βݱࡏͷ࠷৽ͷετ Ξܝࡌ৘ใΛऔಘ͠ɺgit؅ཧԼʹ͓͖·͠ΐ͏ɻ − ͜ͷ࣌஫ҙ͍ͨ͠ͷ͕ɺઌఔμ΢ϯϩʔυͨ͠json ϑΝΠϧ͸gitͷϦϙδτϦʹೖΕͳ͍Α͏ʹͯ͠ ͍ͩ͘͞ɻ > cd

    your_project_folder > fastlane supply init -j /path/to/json > git add . > git push
  86. Step.1(3/3) ͜Μͳײ͡ͰΞοϓσʔτจ͕͸͍ͬͨσΟϨΫτϦ͕ϓϩδΣ ΫτϑΥϧμ಺ʹੜ੒͞Ε·͢ɻ ΞοϓσʔτΛ഑৴͢Δࡍ͸ςΩετϑΝΠϧʹόʔδϣϯίʔ υͷ໊લΛ͚ͭͯɺΞοϓϩʔυ͢Δ͜ͱͰετΞʹߋ৽͕͔͔ Γ·͢ɻ metadata └── android ├──

    en-US │ └── changelogs │ ├── 100000.txt // όʔδϣϯίʔυ͕ϑΝΠϧ໊ʹͳΔ │ └── 100100.txt └── ja-JP └── changelogs └── 100100.txt fastlaneͷ४උ͸Ҏ্Ͱ͢ɻ
  87. Step.2(1/2) • CI͕masterϓογϡʹ൓Ԡͯ͠ɺϦϦʔεϏϧ υΛ࡞੒͠ɺfastlaneΛୟ͘༻ʹઃఆ͠·͠ΐ ͏ɻ release: steps: - script: name:

    Upload to GooglePlay. code: | ls -la $WERCKER_REPORT_ARTIFACTS_DIR ./script/deploy/deploy2googleplay.sh
  88. Step.2(2/2) • /deploy2googleplay.shͷத਎ fastlane supply run -p com.wakwak.awsomeglobalapp \ -j

    ./app/signingConfigs/json_key.json \ -u \ "./app/build/outputs/apk/app-production-arm64-v8a-release.apk",\ "./app/build/outputs/apk/app-production-armeabi-release.apk",\ "./app/build/outputs/apk/app-production-armeabi-v7a-release.apk",\ "./app/build/outputs/apk/app-production-mips-release.apk",\ "./app/build/outputs/apk/app-production-x86-release.apk",\ "./app/build/outputs/apk/app-production-x86_64-release.apk" \ --verbose --skip_upload_images --skip_upload_screenshots ͜͜·Ͱ΍Ε͹ ͱΓ͋͑ͣϏϧυˠϦϦʔε͸׬੒͠·͢
  89. Q.ͳΜ͔ΊΜͲͦ͘͞͏ʁ

  90. A.͸͍ɻΘΓͱ޻ఔ௕͍Ͱ͢ɻ ͜ΕͰ΋ΊͬͪΌল͍ͯ·͢ɻ

  91. ҙ֎ʹ໘౗ • ࣗಈԽͷϑϩʔΛ૊ΈཱͯΔͷ͸ͱͯ΋ָ͍͠ Ͱ͕͢ɺ࠷ॳ͸͜·͝·ͨ͠࡞ۀ͕ଟ͍ͷͰͪ ΐͬͱ໘౗ʹײ͡Δ͔΋͠Ε·ͤΜɻ • Թ͔Έͷ͋Δख࡞ۀϦϦʔεΛ΍ΊΔʹ͸Թ͔ Έͷ͋Δ࡞ۀʹΑͬͯҙ֎͸ͳ͑͠·ͤΜɻ • ϕετͳͷ͸ϦϙδτϦͷΦʔφʔ͕࠷ॳʹΨ

    οʂͬͱ࡞ۀͯ͠͠·͏͜ͱɻ
  92. Step.3(1/2) • Ξοϓϩʔυ׬ྃΛ௨஌͠·͠ΐ͏ releaseͱ͍͏channelʹϏϧυ׬ྃΛ௨஌͢Δ stepΛ௥Ճ͠·͢ɻ after-steps: - slack-notifier: url: $SLACK_URL_RELEASE

    channel: release username: wercker
  93. Step.3(2/2) • શମͰ͸͜Μͳײ͡ʹͳΔ͔ͱࢥ͍·͢ɻ release: steps: - script: name: Upload to

    GooglePlay. code: | ls -la $WERCKER_REPORT_ARTIFACTS_DIR ./script/deploy/deploy2googleplay.sh after-steps: - slack-notifier: url: $SLACK_URL_RELEASE channel: release username: wercker
  94. Step.4 (1/1) • ετΞͷߋ৽Λ௨஌͠·͠ΐ͏ tonkotsuΛ࢖͍·͢ ઃఆํ๏͸ϦϙδτϦʹৄ͘͠ॻ͍ͯ͋Γ·͢ɻ > go run tonkotsu.go

    config.go -c config.toml • ͜ΕͰɺετΞ͕ߋ৽͞Εͨ࣌ʹSlackͷ௨஌ ΛૹΔ͜ͱ͕Ͱ͖ΔͷͰɺىಈ͚͓͚ͩͯ͠͹ ଞͷ࡞ۀʹूதͰ͖·͢
  95. ͜Ε͚ͩ४උ͓͚ͯ͠͹ޙ͸

  96. (͍͍ͩͨ) git push origin master

  97. ͰOKͰ͢

  98. Agenda • ࣗಈԽͷงғؾ • ໨త΍ϞνϕʔγϣϯɺͰ͖Δ͜ͱɺϝϦοτͳͲ • ϦϦʔεࣗಈԽʹؔ࿈͢Δπʔϧͷ঺հ • AndroidΞϓϦͷϦϦʔεͷࣗಈԽʹ໾ʹཱͭπʔϧ܈Λ঺հ͠·͢ɻ •

    Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖ४උʣ • ͍͔ͭ͘ͷϓϩδΣΫτΛྫʹɺࣗಈԽͨ͠ϦϦʔεϑϩʔΛಋೖ͢Δ͜ͱΛߟ͑ͯ Έ·͢ɻ • Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖʣ • ࣮ࡍʹಋೖ͢Δࡍʹඞཁͳ࡞ۀΛνΣοΫ͍͖ͯ͠·͢ɻ • ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺ • ·ͱΊతͳ • ࣭ٙԠ౴
  99. ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺

  100. Case.1 ԿͰ΋͔ΜͰ΋ࣗಈԽ͠Α͏ͱ͢Δ

  101. ԿͰ΋͔ΜͰ΋ࣗಈԽ͠Α͏ͱ͢Δ • લड़͠·͕ͨ͠ɺࣗಈԽͷ࡞ۀࣗମ͸໘౗Ͱ ৭ʑ΍Βͳ͖Ό͍͚ͳ͍Ͱ͢ɻ • ͳͷͰɺϦϦʔεαΠΫϧͷதͰϘτϧωοΫ ʹͳ͍ͬͯΔͱ͜Ζʹݶఆͯࣗ͠ಈԽΛద༻͢ Δ͜ͱͰޮՌ͕࠷େԽ͞Ε·͢ɻ

  102. ͨͱ͑͹ • ϦϦʔε௨஌ͷTwitter΍ࣾ಺ͷ৘ใڞ༗πʔϧ ʹߋ৽಺༰Λ౤ߘ͠Α͏ʂ • ૉ੖Β͍͠ͱ͸ࢥ͍·͕͢ɺຊདྷ͸֤πʔ ϧʹ௚઀ॻ͍͍ͯ͘΄͏͕ॊೈੑ͕ߴ͍΋ ͷΛ͍͍ͪͪࣗಈԽ͢ΔͱΦϨΦϨߋ৽ख ॱ͕ൃੜ͠·͢ɻ •

    ա౓ͳࣗಈԽ͸ଐਓੑΛߴΊͯ͠·͏ͱࢥ ͍ͬͯ·͢ɻ
  103. Case.2 ࣗ෼͕ϦϙδτϦΦʔφʔͰ͸ͳ͍

  104. ࣗ෼͕ϦϙδτϦΦʔφʔͰ͸ͳ͍ • ࣗಈԽ͢Δʹ͋ͨͬͯ͸ηϯγςΟϒͳϑΝΠϧ ΍৘ใΛѻ͏͜ͱʹͳΓ·͢ɻ • ͦΜͳ࣌ʹɺͦͷਓʹ౎౓৘ใͷ֬ೝΛͯࣗ͠ಈ ԽϑϩʔΛ௥Ճ͍ͯ͘͠ͷ͸೉͍͠Ͱ͢ɻ • ͳΔ΂ࣗ͘ಈԽ͸ϦϙδτϦΦʔφʔʹ͍ۙঢ়ଶ Ͱ࣮ࢪ͢Δ͜ͱͰಋೖͷ͠΍͕͔͢͞ΘΓ·͢ɻ

    • ϨʔϧΛෑ͍ͯ͋͛Δͱޙଓͷ։ൃऀ͸ͦ͜ʹͷ ͔͍͖ͬͬͯ·͢ɻ
  105. Agenda • ࣗಈԽͷงғؾ • ໨త΍ϞνϕʔγϣϯɺͰ͖Δ͜ͱɺϝϦοτͳͲ • ϦϦʔεࣗಈԽʹؔ࿈͢Δπʔϧͷ঺հ • AndroidΞϓϦͷϦϦʔεͷࣗಈԽʹ໾ʹཱͭπʔϧ܈Λ঺հ͠·͢ɻ •

    Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖ४උʣ • ͍͔ͭ͘ͷϓϩδΣΫτΛྫʹɺࣗಈԽͨ͠ϦϦʔεϑϩʔΛಋೖ͢Δ͜ͱΛߟ͑ͯ Έ·͢ɻ • Ͳ͏΍ͬͯ΍Δͷ͔ʁʢಋೖʣ • ࣮ࡍʹಋೖ͢Δࡍʹඞཁͳ࡞ۀΛνΣοΫ͍͖ͯ͠·͢ɻ • ࣦഊ͕ͪ͠ͳέʔεͱ஫ҙ఺ • ·ͱΊతͳ • ࣭ٙԠ౴
  106. ·ͱΊͯΈ·͢

  107. ·ͱΊ • ࣗಈԽ͸޻਺͕͔͔ΔͷͰɺಋೖ͢ΔݸॴΛܾఆ͠ ͔ͯΒ͚ͦͩ͜Λ΍Δ͜ͱɻ • ʮ͜͜·Ͱ͍Δ͔ͳ...ʁʯͬͯҰճͰ΋ࢥͬͨΒ ͦͷ෦෼ʹؔͯ͠͸΍Βͳ͍ɻ • ͦ΋ͦ΋ࣗಈԽͷඞཁͳ͍ϓϩδΣΫτ΋͋Δɻ •

    νʔϜͰ࿩͠߹ͬͯΈΔͱྑ͍͔΋͠Εͳ͍ɻ • ࣗಈԽ͢ΔͱϝϦοτ͸͋ΔɻͳͷͰɺੵۃతʹݕ ౼͍ͯͬͯ͠΄͍͠ʂ
  108. Ҏ্Ͱ͢ʂ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ