レバレッジ効果をもたらす自動化のコツ

 レバレッジ効果をもたらす自動化のコツ

9bf923e39671cde83584e3e926296c13?s=128

Kishikawa Katsumi

July 31, 2019
Tweet

Transcript

  1. ϨόϨοδޮՌΛ΋ͨΒ͢ ࣗಈԽͷίπ

  2. ࣗಈԽ͸ඇػೳཁ݅ • ϝϦοτ͕େ͖͍͜ͱཧղ͍ͯͯ͠΋༏ઌ౓Λ্͛ͯऔΓ૊Ή͜ͱ͕೉͠ ͍

  3. ࣗಈԽ͸ϨόϨοδޮՌ͕͋Δ

  4. ࣗಈԽͷखॱ खݩͷ࡞ۀΛ... ੔ཧͯ͠ίϚϯυϥΠϯԽ CIͳͲͰ࣮ߦ͢Δ

  5. ࣗಈԽͷखॱ खݩͷ࡞ۀΛ... ੔ཧͯ͠ίϚϯυϥΠϯԽ CIͳͲͰ࣮ߦ͢Δ ͜Ε͕ϨόϨοδޮՌΛ͏Ή

  6. ϨόϨοδޮՌΛੜΉࣗಈԽͷצͲ͜Ζ • ख࡞ۀ => ࣗಈ࣮ߦ • λεΫ͕ίϚϯυϥΠϯʹ੔ཧ͞ΕΔ • λεΫ͕੔ཧɾ෼ղ͞ΕΔ •

    λεΫ͕ίʔυͰදݱ͞ΕΔʢʓʓ as a codeʣ • ܁Γฦ࣮͠ߦՄೳʹͳΔ • τϥοΩϯά͕Մೳ • ෼ۀՄೳʹͳΔ • ࣮ߦ؀ڥ͕҆ఆ͢Δ
  7. ϨόϨοδޮՌΛੜΉࣗಈԽͷצͲ͜Ζ • ख࡞ۀ => ࣗಈ࣮ߦ • λεΫ͕ίϚϯυϥΠϯʹ੔ཧ͞ΕΔ • λεΫ͕੔ཧɾ෼ղ͞ΕΔ •

    λεΫ͕ίʔυͰදݱ͞ΕΔʢʓʓ as a codeʣ • ܁Γฦ࣮͠ߦՄೳʹͳΔ • τϥοΩϯά͕Մೳ • ෼ۀՄೳʹͳΔ • ࣮ߦ؀ڥ͕҆ఆ͢Δ
  8. λεΫΛίʔυͰදݱ͢Δʢʓʓ as a codeʣ

  9. λεΫΛίʔυͰදݱ͢Δʢʓʓ as a codeʣ

  10. λεΫΛίʔυͰදݱ͢Δʢʓʓ as a codeʣ

  11. λεΫΛίʔυͰදݱ͢Δʢʓʓ as a codeʣ • ࣗಈԽ͕ՄೳʹͳΔ

  12. λεΫΛίʔυͰදݱ͢Δʢʓʓ as a codeʣ • ࣗಈԽ͕ՄೳʹͳΔ • ୭Ͱ΋࣮ߦՄೳʹͳΔ • ಡΊ͹Θ͔ΔΑ͏ʹͳΔ

    • ؀ڥ͕҆ఆ͢Δ • etc.
  13. ࣗಈԽͷखॱ खݩͷ࡞ۀΛ... ੔ཧͯ͠ίϚϯυϥΠϯԽ CIͳͲͰ࣮ߦ͢Δ

  14. λεΫΛίʔυͰදݱ͢Δʢʓʓ as a codeʣ • มߋ؅ཧ͕ՄೳʹͳΔ • τϥοΩϯάՄೳʹͳΔ • ࠶ݱՄೳʹͳΔ

    • etc.
  15. ࣗಈԽͷखॱ खݩͷ࡞ۀΛ... ੔ཧͯ͠ίϚϯυϥΠϯԽ CIͳͲͰ࣮ߦ͢Δ

  16. ࣗಈԽͷखॱ खݩͷ࡞ۀΛ... ੔ཧͯ͠ίϚϯυϥΠϯԽ CIͳͲͰ࣮ߦ͢Δ

  17. λεΫ࣮ߦ؀ڥͱͯ͠ͷBitrise • ϫʔΫϑϩʔͱτϦΨʔͷ࢓૊Έ͕ॊೈͰڧྗ • εέδϡʔϧ࣮ߦ͕ʢ͓ͦΒ͘ʣແݶʹఆٛͰ͖Δ • Web UI͕ศར

  18. λεΫ࣮ߦ؀ڥͱͯ͠ͷBitrise • ϩά͕ݟͮΒ͍ • ίϚϯυϥΠϯͰͰ͖Δૢ࡞͕গͳ͍ • ίϛοτ୯ҐͰ࣮ߦΛεΩοϓ͠ʹ͍͘

  19. Bitriseͷόϥϯεͷ͍͍ར༻ͷίπ • ϒϥϯνͱϫʔΫϑϩʔΛ໊લϧʔϧͰϚοϐϯά͢Δͱศར • ࣮ߦͷίετ͕͍҆ͷͰࣦഊΛؾʹͤͣʹϦτϥΠͰϦΧόʔ͢Δ • σόοά͸େมͳͷͰૉ௚ʹ࣮ߦ͞ΕΔΑ͏ʹ͢Δ • όϦΤʔγϣϯ͸τϦΨʔͱϒϥϯνͷ૊Έ߹ΘͤͰ࣮ݱ͢Δ

  20. GitHubΛத৺ͱ͢ΔࣗಈԽͷγεςϜ • τϦΨʔͱͯ͠ͷPR • ςετ؀ڥͱͯ͠ͷϒϥϯν • λεΫͷมߋ؅ཧ • ࣮ߦ݁Ռͷอଘɾ؅ཧ •

    ϑΝΠϧஔ͖৔ͱͯ͠ͷGitHub • Ծ૝࣮ߦ؀ڥͱͯ͠ͷCI
  21. • deliver • deliver-internal • deliver-external • nightly-build • update-license-plist

    • refresh-dSYMs • test • sync-bitrise-yml • renew-build-cache • update-dependencies • update-tools • nightly-tests App Store Connect/Fabric΁ͷ഑৴ masterͰϑϧϏϧυ͢Δ ͢΂ͯͷςετΛ࣮ߦ OSSͷϥΠηϯε৘ใͷߋ৽ dSYMͷΞοϓϩʔυ PR͝ͱͷςετ Bitrise.ymlͷμ΢ϯϩʔυ ϥΠϒϥϦͷࣗಈߋ৽ πʔϧͷࣗಈߋ৽ ϏϧυΩϟογϡͷΫϦʔχϯά
  22. • deliver • deliver-internal • deliver-external • nightly-build • update-license-plist

    • refresh-dSYMs • test • sync-bitrise-yml • renew-build-cache • update-dependencies • update-tools • nightly-tests App Store Connect/Fabric΁ͷ഑৴ masterͰϑϧϏϧυ͢Δ ͢΂ͯͷςετΛ࣮ߦ OSSͷϥΠηϯε৘ใͷߋ৽ dSYMͷΞοϓϩʔυ PR͝ͱͷςετ Bitrise.ymlͷμ΢ϯϩʔυ ϥΠϒϥϦͷࣗಈߋ৽ πʔϧͷࣗಈߋ৽ ϏϧυΩϟογϡͷΫϦʔχϯά Ϗϧυ؀ڥͷ҆ఆԽ ϦϦʔε͕τϥοΩϯάՄೳ ୭Ͱ΋ɾͲ͜Ͱ΋ɾ͍ͭͰ΋ϦϦʔεՄೳ Ϗϧυ؀ڥ as a code Ϗϧυʹඞཁͳ΋ͷ Ϗϧυखॱ ґଘؔ܎ ෆ۩߹͕ग़ͨͱ͖ͷௐࠪ ؀ڥͷมߋͷτϥοΩϯά
  23. ϏϧυɾςετͷࣗಈԽ $ brew update $ brew reinstall "carthage" $ bundle

    install --path=vendor/bundle --binstubs=vendor/bin $ bundle exec fastlane download_build_cache $ Scripts/build_carthage $ Scripts/build_pods $ bundle exec fastlane folio_tests $ set -o pipefail && xcodebuild test -workspace Folio.xcworkspace -scheme Folio-Release-Staging -destination 'name=iPhone X,OS=11.4' -only-testing:FolioTests -derivedDataPath DerivedData -enableCodeCoverage YES ENABLE_TESTABILITY=YES | xcpretty
  24. ϦϦʔεϏϧυɾ഑৴ͷࣗಈԽ $ brew update $ brew reinstall "carthage" $ bundle

    install --path=vendor/bundle --binstubs=vendor/bin $ bundle exec fastlane download_build_cache $ Scripts/build_carthage $ Scripts/build_pods $ bundle exec fastlane folio_tests $ set -o pipefail && xcodebuild test -workspace Folio.xcworkspace -scheme Folio-Release-Staging -destination 'name=iPhone X,OS=11.4' -only-testing:FolioTests -derivedDataPath DerivedData -enableCodeCoverage YES ENABLE_TESTABILITY=YES | xcpretty
  25. ɹϥΠϒϥϦͷࣗಈߋ৽

  26. OpenAPI (Swagger)ͷࣗಈੜ੒

  27. OpenAPI (Swagger)ͷࣗಈੜ੒

  28. Bitrise.ymlͷಉظ

  29. ɹϥΠϒϥϦͷϏϧυͱΩϟογϡ

  30. ɹϥΠϒϥϦͷϏϧυͱΩϟογϡ

  31. ΫϦʔϯͳԾ૝؀ڥͱͯ͠ͷBitrise

  32. ·ͱΊ • λεΫΛίʔυͰදݱ͢Δ͜ͱͰϨόϨοδ͕ޮ͘ • BitriseΛ࢖͏৔߹͸ɺGitHubΛτϦΨʔ΍࣮ߦͷίϯτϩʔϧͱͯ͠࢖͏ ͱόϥϯε͕͍͍ • Bitrise͸ΫϦʔϯͳϏϧυ؀ڥͱͯ͠ར༻Ͱ͖ΔʢAlt Dockerʁʣ •

    ࣗಈԽΛಥ͖٧ΊΔͱখ͞ͳίετͰେ͖ͳϝϦοτ͕ಘΒΕΔ
  33. Reference https://blog.kishikawakatsumi.com/entry/2019/06/19/160150