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

CircleCIとwercker

 CircleCIとwercker

Affc58cd0f63630fb0c5bcec49902546?s=128

ryonext

May 21, 2014
Tweet

Transcript

  1. CircleCIͱwercker ryonext

  2. ࣗݾ঺հ @ryonext ࠷ۙiPhoneΛམͱͯ͠ΨϥεΛׂΓ·͠ ͨ

  3. ϒϩάॻ͖·ͨ͠ http://ryonext.hatenablog.com/entry/ 2014/05/20/093828

  4. CircleCI

  5. ಋೖʹࢸͬͨܦҢ Ҏલ͸Ұ൪͍҆ϓϥϯ($19/݄)ͩͱ1 private repository͔͠ϏϧυͰ͖ͳ͔ͬ ͨͷ͕ɺແ੍ݶʹͳͬͨ ಉ࣮࣌ߦδϣϒ਺Ͱ՝ۚʹͳͬͨ

  6. ྑ͍఺ privateϦϙδτϦΛϏϧυ͢Δͷ͕ϝΠϯͷUXʹͳ͍ͬͯΔ ଎͍ʢJenkinsΛ AWS m1.smallͰಈ͔͢ΑΓ2ഒఔ౓଎͍ʣ ಋೖ͕؆୯ JenkinsͷΑ͏ͳWebUIͰͷδϣϒೖྗɺymlͰͷδϣϒొ࿥ͷ྆ํαϙʔ τ ͓ࢼ͠͸Web͔Β΍ͬͯɺ͏·͘ಈ͍ͨΒymlΛϦϙδτϦʹೖΕΔɺͱ ͍͏͜ͱ͕Ͱ͖Δ

    ࡞ͬͨΠϝʔδʹ͠͹Β͘sshͰ͖ΔͷͰղੳ͕ḿΔ αϙʔτ͕खް͍
  7. ѱ͍఺ sudoͰ͖ͳ͍ ͦͯ͠೔ຊlocale͕ೖͬͯͳ͍

  8. ͦͷଞɺJenkinsൺͰྑ͍ ఺ ӡ༻ͷ৺഑͕ͳ͍ ֓Ͷඞཁͦ͏ͳػೳ͸࠷ॳ͔Βೖ͍ͬͯ ΔʢϏϧυɺ௨஌࿈ܞ౳ʣ pushͨ͠Β͙͢ςετͯ͘͠ΕΔͷͰ pull req͢Δࠒʹ͸΋͏Ϛʔδͯ͠OK͔ Θ͔Δ

  9. Jenkins͡Όͳ͍ͱ೉͍͠ ͱ͜Ζ Ϗϧυ࣌ؒʹ੍ݶ͕͋Δ ࡉ͔͍ύΠϓϥΠϯࢦఆͳͲ͸Ͱ͖ͳ ͍ cronͱͯ͠࢖͏

  10. wercker΋ࢼͯ͠Έͨ

  11. ྑ͔ͬͨ఺ sudoՄೳ ίϯςφ΍֤࣮ߦίϚϯυ͕ϓϥΨϒϧʹ ͳ͓ͬͯΓɺݸਓͷ։ൃऀ͕௥ՃػೳΛ౤ ߘՄೳ ͜Ε͔Β৳ͼ͍͖ͯͦ͏ ·ͩϕʔλͳͷͰແྉ

  12. ѱ͔ͬͨ఺ OSSΛओ࣠ʹͨ͠UXɻpublicʹ͢ΔϘλϯ͕ৗʹग़ ͯΔ αΠτ͕མͪΔ DB౳͕localhostʹͳ͍ ؀ڥม਺Ͱࢦఆ͢Δherokuํࣜ Ұ෦ͷίϚϯυ͕ಠࣗDSL

  13. ಠࣗDSLৄ͘͠ bundle install Λ bundle-install ͱॻ͔ͳ ͍ͱ͍͚ͳ͍ͱ͔ ҰԠɺscriptͱ͍͏ͦͷ··γΣϧΛॻ ͚ΔίϚϯυ͋Γ

  14. wercker·ͱΊ ·ͩϕʔλͳͷͰ҆ఆੑѱ͍ͷ͸࢓ํͳ͍ ͜Ε͔Β৳ͼͦ͏ ࠓ೔ݟͨ͜ͷهࣄ໘ന͔ͬͨ bitbucketͱwerckerͰ̌ԁCIΛ͢Δ - razokulover publog http://razokulover.hateblo.jp/entry/ 2014/05/21/000306

  15. ʢJenkinsͰ΋Ͱ͖Δ͚Ͳʣ pull reqσϓϩΠ΍ͬͯΈͨ naoya͞ΜͷهࣄΛࢀߟʹ GitHub ࣌୅ͷσϓϩΠઓུ - naoyaͷ ͸ͯͳμΠΞϦʔ http://d.hatena.ne.jp/

    naoya/20140502/1399027655
  16. ͜͏͍͏ͷ feature => developʹ pull reqͯ͠Ϛʔδ stagingʹσϓϩ Π develop =>

    master ʹ pull reqͯ͠Ϛʔδ ຊ൪ʹσϓϩΠ
  17. ײ૝ ͜ͷϘλϯԡͨ͠ΒσϓϩΠ͞ΕΔʂͬ ͯͷ͕͍͋ͬͯ͢͝ϫΫϫΫ͢Δɻ

  18. ΍ͬͯΈͨ݁Ռ

  19. Failed!

  20. ͜ ͷ ͋ ͱ ͪ Ό Μ ͱ म ਖ਼

    ͠ ͨ
  21. ·ͱΊ AWSͷsmall instanceͰJenkinsͯ͠ΔͳΒ֎෦ͷ CIαʔϏε࢖ͬͯΈΔͱྑ͍ Jenkins࢖ͬͯͳ͍ͳΒͳ͓͞Β ϑϧΧελϜJenkinsࢯͷ୅ΘΓʹ͸ͳΓͮΒ͍ pull reqͯ͠Ϛʔδͯ͠σϓϩΠ͞ΕΔͷϚδͰ ྑ͍͔Β΍Δ΂͖