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

CI/CDツール比較してみた

 CI/CDツール比較してみた

大手Gitホスティングサービス3社でよく使われているCI/CDツール、Bitbucket Pipelines, GitLab CI/CD, CircleCIを比較してみました。

B6afdece50e55e1f6ffe6f36214fbdd4?s=128

Kai Shoya

July 12, 2019
Tweet

Transcript

  1. CI/CDπʔϧൺֱͯ͠Έͨ

  2. ࣗݾ঺հ גࣜձࣾϥϯόʔϛϧ ߕ൹ᠳ໵ɹ@shonari123 ܦྺ • [ઐ໳ֶߍ]ϠΫβͷΑ͏ͳԸࢣʹγΰ͔ΕΔ • [ब৬]”ྑ͍”اۀʹब৬͢Δ͕਺ϲ݄ͰࣙΊͯχʔτ΁ • [࠶ब৬]ࠓͷձࣾʹब৬

    ࠷ۙ࢖͏ٕज़ • Java, PHP, MySQL, Vue.js, Firebase
  3. CI/CDͬͯͳʹʁ

  4. CI/CDͱ͸ ʮCIʯͱ͸ʮContinuous IntegrationʢܧଓతΠϯςάϨʔγϣϯʣʯͷུͰɺιϑ τ΢ΣΞ։ൃʹ͓͚ΔϏϧυ΍ςετΛࣗಈԽ͠ɺܧଓతʹߦ͏Ξϓϩʔνͷ͜ͱ Ͱ͢ɻ ʮCDʯͱ͸ʮContinuous DeliveryʢܧଓతσϦόϦʔʣʯͷུͰɺCIʹΑͬͯςε τ͞ΕͨίʔυͷϚʔδ΍ɺຊ൪؀ڥ޲͚ͷϏϧυͷ࡞੒Λࣗಈతʹߦ͍ɺຊ൪؀ ڥʹσϓϩΠ͕Մೳͳঢ়ଶΛ੔͑Δϓϩηεͷ͜ͱͰ͢ɻ ·ͨʮCDʯ͸ʮContinuous

    DeploymentʢܧଓతσϓϩΠʣʯͷུͱͯ͠࢖ΘΕΔ ͜ͱ΋͋Γ·͢ɻܧଓతσϓϩΠ͸ܧଓతσϦόϦʔͱΑ͘ࣅͨ֓೦Ͱ͕͢ɺܧଓ తσϦόϦʔ͕σϓϩΠՄೳͳঢ়ଶΛ४උ͢Δ͚ͩͳͷʹର͠ɺܧଓతσϓϩΠ͸ ࣮ࡍʹຊ൪؀ڥ΁ͷσϓϩΠ·ͰΛߦ͏఺͕ҟͳΓ·͢ɻ ͜ͷΑ͏ͳϏϧυɺςετɺσϓϩΠΛࣗಈԽ͠ɺܧଓతʹߦ͏ख๏ͷ͜ͱΛɺ͋ ΘͤͯʮCI/CDʯͱݺͼ·͢ɻ χϑΫϥʰʮCI/CDʯͱ͸ʱ(https://pfs.nifcloud.com/navi/words/ci_cd.htm : 2019/07/04)
  5. CI/CDͱ͸ CI: ςετ΍ϏϧυΛࣗಈͰߦ͏͜ͱ CD: CI͕OKͩͬͨΒࣗಈͰσϓϩΠ ͢Δ͜ͱ

  6. GitϗεςΟϯάαʔϏε Push Pull Request CI/CDπʔϧ Push, Pull RequestΛݕ஌ ςετɾϏϧυΛ࣮ߦ ςετɾϏϧυ͕

    ௨ͬͨΒσϓϩΠ
  7. CI/CDͷྲྀΕ Init Test Build Deploy checkoutͨ͠Γ yarn installͨ͠Γ ςετͱϏϧυΛฒྻʹ࣮ߦ masterϒϥϯνͷ࣌ͷΈ

    શ෦௨ͬͨΒσϓϩΠ
  8. ൺֱ͢ΔCI/CDπʔϧ •Bitbucket Pipelines •GitLab CI/CD •Circle CI

  9. Bitbucket Pipelines

  10. feature/cicd master develop merge checkout pull request pull request commit

    merge ͚ͩ͜͜ νΣοΫ͢Δ CI/CD͢ΔՕॴ
  11. ઃఆ ʮEnable PipelinesʯΛOnʹ͢Δ ϓϩδΣΫτͷϧʔτσΟϨΫτϦʹ ʮbitbucket-pipelines.ymlʯΛ࡞੒

  12. yml

  13. yml ؀ڥม਺ Docker Image UnitςετͱBuildΛ ฒྻʹ࣮ߦ node_modules/Λ શମͰڞ༗ લճ࣮ߦͨ࣌͠ͷ node_modules/Λίϐʔ

    શͯͷpull requestͰ initͱciΛ࣮ߦ cachesΛར༻͢ΔͨΊ ϩʔΧϧʹอଘ
  14. ߏจνΣοΫ

  15. ੒ޭ

  16. ࣦഊ

  17. ίϛοτҰཡ

  18. GitLab CI/CD

  19. feature/cicd master develop merge checkout pull request pull request commit

    merge ͚ͩ͜͜ νΣοΫ͢Δ CI/CD͢ΔՕॴ
  20. ઃఆ ϓϩδΣΫτͷϧʔτσΟϨΫτϦʹ ʮ.gitlab-ci.ymlʯΛ࡞੒

  21. yml

  22. yml Job Jobͷ࣮ߦॱ stage͕ಉ໊͡લ ͩͬͨΒฒྻʹॲཧ masterͱϓϧϦΫ࣌ͷΈ ࣮ߦ Docker Image ؀ڥม਺

    node_modules/ͱdist/Λ શମͰڞ༗ લճ࣮ߦͨ࣌͠ͷ node_modules/Λίϐʔ
  23. ߏจνΣοΫ

  24. ੒ޭ

  25. ࣦഊ

  26. ίϛοτҰཡ

  27. Circle CI

  28. feature/cicd master develop merge checkout pull request pull request commit

    merge ͚ͩ͜͜ νΣοΫ͢Δ CI/CD͢ΔՕॴ
  29. feature/cicd master develop merge checkout pull request pull request commit

    merge ͚ͩ͜͜ νΣοΫ͢Δ CI/CD͢ΔՕॴ
  30. ઃఆ Circle CIʹαΠϯΠϯ(αΠϯΞοϓ)͠Github/ BitbucketΞΧ΢ϯτͱ࿈ܞ͢Δ ϓϩδΣΫτʹʮ.circleci/config.ymlʯΛ࡞੒

  31. None
  32. yml

  33. yml Docker Image ؀ڥม਺ node_modules/Λอଘ લճอଘͨ͠ node_modules/ಡΈࠐΈ ΧϨϯτσΟϨΫτϦΛڞ༗ ڞ༗͞ΕͨσΟϨΫτϦΛΞλον dist/Λڞ༗

    master͚ͩ Ͱ࣮ߦ ׬ྃΛ଴ͭjobΛࢦఆ ಉ͡jobΛࢦఆ͢Δͱ ฒྻʹͳΔ
  34. ߏจνΣοΫ

  35. ੒ޭ

  36. ࣦഊ

  37. ίϛοτҰཡ

  38. Bitbucket Pipelines GitLab CI/CD Circle CI υΩϡϝϯτ ೔ຊޠ͋Γ ೉͍͠ ӳޠͷΈ

    ΍΍༏͍͠ ೔ຊޠ͋Γ ΍΍೉͍͠ ίϯςφ਺ ແྉ࿮ ແ੍ݶʁ ແ੍ݶʁ 1 OSSͷ৔߹: 4 Ϗϧυ࣌ؒ/݄ ແྉ࿮ 50෼/݄ 2,000෼/݄ 1,000෼/݄ Ωϟογϡ ͋Γ ͋Γ ༗ྉ Ϗϧυʹ͔͔ͬͨ࣌ؒ ໿2෼ ໿5෼30ඵ ໿3෼ ߏจνΣοΫ Validator Θ͔ΓͣΒ͍ CI Lint ΍΍Θ͔Γ΍͍͢ circleciίϚϯυ Θ͔Γ΍͍͢ ൺֱ
  39. ·ͱΊ • Bitbucket Pipelines • !Ϗϧυ͕Ұ൪ૣ͍ • "Ϗϧυ࣌ؒ/݄͕୹͍ʢελϯμʔυϓϥϯ: 500෼/݄ʣ •

    Gitlab CI • !υΩϡϝϯτ͕Θ͔Γ΍͘͢ɺϏϧυ࣌ؒ/݄͕Ұ൪ଟ͍ • "αʔόʔͷࠞΈ۩߹͕͔ͳΓӨڹ͢Δʢૣ͍࣌͸3෼ऑʣ • Circle CI • !ߏจνΣοΫ͸Ұ൪Θ͔Γ΍͍͢ • "filtersʹPull RequestΛࢦఆͰ͖ͳ͍
  40. ymlΛGithubʹͯެ։தʂ https://github.com/KaiShoya/CICD-Examples