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

ベンチャー企業がCircleCIを選んだ理由と活用方法

 ベンチャー企業がCircleCIを選んだ理由と活用方法

第2回CircleCI ユーザーコミュニティミートアップ 発表内容
https://circleci.connpass.com/event/120371/

Yasuhiroki

March 05, 2019
Tweet

More Decks by Yasuhiroki

Other Decks in Technology

Transcript

  1. ϕϯνϟʔاۀ͕
    CircleCIΛબΜͩཧ༝
    ͱ׆༻ํ๏
    A10 Lab Inc.

    @yasuhiroki

    View full-size slide

  2. ࣗݾ঺հ Workflow

    View full-size slide

  3. Yasuhiroki (@duck_yasuhiroki)

    View full-size slide

  4. CircleCI User Community ӡӦ

    View full-size slide

  5. ޷͖ͳ΋ͷ / ۤखͳ΋ͷ

    View full-size slide

  6. Workflowશମ

    View full-size slide

  7. ͪΌΜͱ Job ΋ॻ͍ͨΑ

    View full-size slide

  8. ࣗݾ঺հ ৄࡉ
    • yasuhiroki (tw: @duck_yasuhiroki)
    • CircleCI User Community ӡӦϝϯόʔ
    • CircleCIྺ͸ 2.0 ͕ग़ͨࠒ͔Β
    • ͦͷલ͸ Jenkins ͓͡͞Μ

    View full-size slide

  9. ϕϯνϟʔاۀ͕CircleCIΛ
    બΜͩཧ༝ͱ׆༻ํ๏

    View full-size slide

  10. ฐࣾ঺հ
    • A10 Lab Inc.
    • 2017೥2݄ʹιχʔ͔Βಠཱ
    • ࡾ೔๥ओ๷ࢭΞϓϦʮΈΜνϟϨʯ

    View full-size slide

  11. ϝϯόʔ໿ 10໊

    (ΠϯλʔϯؚΉ)

    View full-size slide

  12. ΤϯδχΞ
    7໊

    (ΠϯλʔϯؚΉ)

    View full-size slide

  13. ΤϯδχΞͷ୲౰಺༁
    • Android: 3໊
    • iOS: 4໊
    • API: 3໊
    • AWS 2໊

    View full-size slide

  14. ΤϯδχΞ਺ΑΓଟ͍
    • Android: 3໊
    • iOS: 4໊
    • API: 3໊
    • AWS 2໊
    > 7

    View full-size slide

  15. ΤϯδχΞ਺ΑΓଟ͍
    • Android: 3໊
    • iOS: 4໊
    • API: 3໊
    • AWS 2໊
    1ਓN໾

    View full-size slide

  16. ͓໰͍߹Θͤ

    ɹ=> ରԠ͠·͢
    ετΞϨϏϡʔ
    ɹ=> ରԠ͠·͢
    αʔϏε಺௨ใ
    ɹ=> ରԠ͠·͢

    View full-size slide

  17. ։ൃ͢Δ࣌ؒ͸ݶΒΕ͍ͯΔ

    View full-size slide

  18. ͦΜͳ؀ڥͰ

    CircleCI Λͳͥબͼ

    CircleCI ͰԿΛͨ͠ͷ͔

    View full-size slide

  19. CircleCIΛબΜͩཧ༝

    View full-size slide

  20. CircleCI ΛબΜͩཧ༝
    • ར༻͢ΔαʔϏεΛݮΒ͍ͨ͠

    View full-size slide

  21. ར༻͢ΔαʔϏεΛݮΒ͍ͨ͠
    • ࣾһ਺͕গͳ͍ͷͰ 1ਓN໾
    • Android/iOS/Rails ͳͲԣஅͯ͠୲౰
    • ݶΒΕͨϦιʔεͷதͰ΍Γ͘Γ

    View full-size slide

  22. Ϧιʔε͕ݶΒΕ͍ͯΔͷͰ
    • αʔϏεΛ͍ͭ͘΋࢖͏ͱɺ

    ֶशίετɾ؅ཧίετ ͕૿͑ͯࠔΔ
    • 1ͭͷαʔϏεʹू໿Ͱ͖Δͱخ͍͠

    View full-size slide

  23. ͦ͜Ͱ CircleCI ΛબͿ
    • iOS/Android/Rails/AWS ͢΂ͯରԠͰ͖Δ

    View full-size slide

  24. CircleCI ΛબΜͩ΋ͷͷ...
    • iOS/Android/Rails/AWS ͢΂ͯରԠͰ͖Δ
    • ͱɺࢥ͍͕ͬͯͨ...

    View full-size slide

  25. CircleCI ͷ macOS ϓϥϯ
    • Linuxͱ͸ผྉۚ
    • ࠷௿ $39/݄
    • Ϗϧυ੍࣌ؒݶ
    • ࠷௿ 500෼/݄

    View full-size slide

  26. CircleCI ͷ macOS ϓϥϯ
    • ຖ೔ΨϯΨϯϏϧυ͍ͨ͠
    • 500෼͡Ό଍Γͳ͍
    • ͬ͘͟Γܭࢉ͢Δͱɺ

    ɹɹ1Ϗϧυ10෼ * 10ճ * 20೔

    ɹɹɹɹɹɹɹ => 2000෼ ཉ͍͠

    View full-size slide

  27. CircleCI ͷ macOS ϓϥϯ
    • ্ҐͷϓϥϯͳΒͲ͏͔
    • $129/݄ (1800෼)
    • $249/݄ (5000෼)
    • ଞͷख͕ͳ͍͔ͳ͊...

    View full-size slide

  28. iOS ͸ bitrise ʹͨ͠
    • ΫϥΠΞϯτΞϓϦʹ

    ಛԽ͍ͯ͠ΔͷͰ͔Ώ͍ͱ͜Ζʹख͕ಧ͘
    • ຖ೔ΨϯΨϯϏϧυͰ͖ΔΑ͏ʹͳͬͨ
    • CircleCI ͷΩϡʔ͕ۭ͍ͯྑ͍
    • ࢖͏αʔϏε͕૿͑ͨ...

    View full-size slide

  29. ͍ͬͦ bitrise ʹ౷Ұ͢Δʁ
    • bitrise ͸ΫϥΠΞϯτΞϓϦʹಛԽ
    • Rails ΍ AWS Λѻ͏ͷ͸Ͱ͖ͳ͍?

    Ͱ͖ͨͱͯ͠΋೉ͦ͠͏?

    View full-size slide

  30. CircleCI & bitrise ମ੍ʹ
    • CircleCI ʹ౷Ұ͍ͨ͠ؾ࣋ͪ͸͋Δ
    • iOSαϙʔτ͕ڧԽ͞ΕΔͱ͍͍ͳ͊

    View full-size slide

  31. CircleCIͷ׆༻ํ๏

    View full-size slide

  32. 1ਓN໾ͷ՝୊

    View full-size slide

  33. ઐ໳֎ͷྖҬʹ৮ΕΔͷͰ...
    • ίʔυͷॻ͖ํ͕ͦΕͧΕҧͬͯށ࿭͏
    • σϓϩΠɾϦϦʔεํ๏͕Α͘෼͔Βͳ͍

    View full-size slide

  34. ͢΂͖͜ͱʹूத͍ͨ͠
    • ࣮૷͢Δػೳʹूத͍ͨ͠
    • ࢓༷ɺϩδοΫɺઃܭ ʹूத͍ͨ͠

    View full-size slide

  35. ࣗಈԽͰ͖Δͱ͜Ζ͸ࣗಈԽ
    • Ϗϧυɺςετͷ֬ೝ => ࣗಈԽ
    • ίʔυϑΥʔϚοτͷ֬ೝ => ࣗಈԽ
    • σϓϩΠɺϦϦʔε࡞ۀ => ࣗಈԽ

    View full-size slide

  36. ཧ૝Λ૝૾
    • GitHub Λී௨ʹ࢖͑͹ྑ͍࢓૊Έʹ͍ͨ͠
    • ಛผͳϧʔϧ͸࡞Γͨ͘ͳ͍
    • ආ͚͍ͨϧʔϧͷྫ
    • ʮXXϥϕϧ͕͋Δ࣌͸YY͢Δʯ
    • ʮϦϦʔεͨ͘͠ͳ͍࣌͸ ZZ ͢Δʯ

    View full-size slide

  37. τϦΨʔ͸։ൃखॱʹؚΊΔ
    • ॲཧΛ࣮ߦ͢ΔτϦΨʔ͸ҎԼʹݶఆ
    • GitHubʹϓογϡ
    • ϓϧϦΫΤετ࡞੒
    • ϓϧϦΫΤετΛϚʔδ
    • ͜ͷτϦΨʔͰରԠͰ͖ͳ͍͜ͱ͸΍Βͳ͍
    • => ෳࡶͳӡ༻ϧʔϧΛ࡞Βͳ͍

    View full-size slide

  38. ࣗಈԽ͠΍͍͢ϒϥϯνߏ੒
    • ϒϥϯνߏ੒͸୯७ͳํ͕ࣗಈԽ͠΍͍͢
    • ࣍ͷ4छྨʹͳΔΑ͏ϧʔϧΛม͑ͨ
    • feature
    • develop
    • staging
    • master

    View full-size slide

  39. feature ͷ Workflow
    Lint Unit Test

    View full-size slide

  40. reviewdog ͰࣗಈϨϏϡʔ

    View full-size slide

  41. featureͷUT͸ܰΊʹ

    View full-size slide

  42. UT͸ฒྻͰ࣮ߦͰ͖ΔΑ͏ʹ

    View full-size slide

  43. ΧόϨοδ݁Ռ͕

    ෼ׂ͞Ε͍ͯΔͷͰϚʔδ͢Δ

    View full-size slide

  44. develop ͷ Workflow
    Unit Test Deploy
    ϓϧϦΫ࡞੒

    View full-size slide

  45. Deploy
    ։ൃ؀ڥʹσϓϩΠ
    ex) eb deploy

    View full-size slide

  46. ϓϧϦΫΤετࣗಈ࡞੒ɾߋ৽

    View full-size slide

  47. ϓϧϦΫͷλΠτϧ͕ॏཁ
    ϓϧϦΫΤετͷ

    λΠτϧ͕ॻ͔Ε͍ͯΔ

    View full-size slide

  48. ϓϧϦΫͷλΠτϧ͕ॏཁ
    • ϓϧϦΫͷλΠτϧ == ϦϦʔε෺ͷઆ໌จ
    • git log ͷ Merge ίϛοτ͔ΒϓϧϦΫΤετΛಛ
    ఆ͠ɺͦͷλΠτϧΛऔಘͯ͠࢖͍ͬͯΔ
    • Merge ίϛοτ͕ඞཁͳͷͰ git rebase ࣌͸஫ҙ
    • git rebase --preserve-merges ͠ͳ͍ͱ Merge ί
    ϛοτ͕ফ͑ͯ͠·͏

    View full-size slide

  49. staging / master ͸

    develop ͱ΄΅ಉ͡

    View full-size slide

  50. ࡞ͬͨ࢓૊ΈͷҰཡ
    • GitHubʹϓογϡ

    ɹɹ => Ϗϧυɺςετ
    • ϓϧϦΫΤετΛ࡞੒

    ɹɹ => ίʔυϨϏϡʔ
    • ϓϧϦΫΤετΛϚʔδ

    ɹɹ => σϓϩΠɺϓϧϦΫ࡞੒ɾߋ৽

    View full-size slide

  51. TODO
    • Android ͷ PlayετΞ σϓϩΠ
    • GitHub ͷ Tag / Release ͷࣗಈ࡞੒

    View full-size slide

  52. (͓·͚) NightlyϏϧυ
    • CircleCI ͸ cronه๏Ͱɺ

    ࢦఆͨ͠λΠϛϯάͰࣗಈϏϧυͰ͖Δ
    • ௒ศར

    View full-size slide

  53. ࢖༻ྫ Ұ೔Ұճ update gems

    View full-size slide

  54. ·ͱΊ
    • CircleCI ͸ iOS/Android/Rails ͢΂ͯΛΧόʔ
    Ͱ͖Δ ※ୠ͠ iOS ͸੍ݶ͋Γ
    • GitHub Ͱී௨ʹ։ൃ͢Δ͚ͩͰྑ͍࢓૊ΈΛ
    ࡞ͬͨ

    View full-size slide