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

CircleCI Orbs にコントリビュートした話 / Story contributed...

Naoto Enokawa
December 11, 2019

CircleCI Orbs にコントリビュートした話 / Story contributed to CircleCI Orbs

Naoto Enokawa

December 11, 2019
Tweet

More Decks by Naoto Enokawa

Other Decks in Technology

Transcript

  1. ෱རްੜ ͦͷ̍ ‘ ۙྡॅ୐ख౰ʢձ͔ࣾΒ1kmҎ಺ʹॅΜͩΒ࠷େ5ສԁ΋ิॿ͕ʂʣ • ދϊ໳Ҏ֎͸1kmݍ಺Ͱ΋3ສʹͳΓ·͢ ‘ ۙྡॅ୐ख౰஍Ҭ΁ͷҾӽ͠අ༻ิॿʢ࠷େ15ສࢧڅʣ ‘ ԕڑ཭௨ۈख౰ʢ௨ۈʹ1.5࣌ؒҎ্͔͔Δਓ޲͚ʣ

    ‘ άϦʔϯंख౰ʢ௨ۈʹ1࣌ؒҎ্͔͔Γɺۀ຿͕๩͍͠ਓ޲͚ʣ ‘ ݈߁ҡ࣋ͷҝͷεϙʔπࢧԉ • ࣾһ4ਓҎ্͕ू·ͬͯεϙʔπΛ͢Δࢪઃར༻ྉ൒ֹิॿʢ1ਓ্ݶ5,000ԁʣΛิॿ ‘ εϙʔπେձࢀՃิॿ • ࣾһ͕εϙʔπେձʹࢀՃ͢Δ৔߹ɺͦͷࢀՃඅͷ൒ֹʢ্ݶ 1ճʹ͖ͭ1ສԁʣΛิॿ ‘ ձࣾՃೖIT݈อͷεϙʔπδϜར༻Մ
 ʢίφϛεϙʔπΫϥϒɺηϯτϥϧεϙʔπɺ΁Δ͢ͽ͋ʣ ‘ ؔ౦ITιϑτ΢ΣΞ݈߁อݥ૊߹
  2. ෱རްੜ ͦͷ̎ ‘ ֤छࢿ֨ࢧԉ༗ΓʢAWSೝఆࢼݧͳͲશֹෛ୲ʣ ‘ ࢈ٳɾҭٳ੍౓͋Γ ‘ ැཆՈ଒ख౰ʢැཆՈ଒͕૿͖͑ͯͨΒॿ͔Δʂʣ ‘ γϑτۈ຿ख౰ʢ24/365ӡ༻ͷMSPνʔϜ޲͚ʣ

    ‘ Ϛοαʔδɾ᭥ɾΧΠϩϓϥΫςΟοΫ
 ʢ݄ɾۚʹϓϩͷࢪज़͕ΦϑΟεͰड͚ΒΕ·͢ʣ ‘ 10࣌ग़ۈख౰ʢ10࣌લʹग़ࣾ͢Δͱຖ೔1,000ԁͰ·͢ʂʣ ‘ ໾৬ऀϦϑϨογϡٳՋ੍౓
  3. CircleCI Orbs ‘ jobs ΍ command ܈Λύοέʔδͨ͠΋ͷ ‘ ಠࣗ Orb

    ͷެ։΋Մೳ ‘ .circleci/config.yml ͕εοΩϦ
  4. CircleCI Orbs ͷ஫ҙ఺ ‘ Uncertified Orbs Λར༻͢Δࡍ͸ Security Settings ͔Β

    ࢖༻ΛڐՄ͢Δඞཁ͕͋Δ ‘ Organization ୯ҐͰͷڐՄ ‘ 2019/12/10 ݱࡏ Uncertified Orbs ΛҰ౓ Publish ͢Δͱ ࡟আෆՄ ‘ CircleCI Support ʹґཔ͢Δ͜ͱͰ࡟আՄೳ https://circleci.com/docs/2.0/creating-orbs/
  5. ίϯτϦϏϡʔτલͷ͓࿩ ‘ CircleCI ͔Β CodeDeploy Ͱ Blue/Green Deployment ͍ͨ͠ ‘

    ݕ౼ஈ֊ͷλΠϛϯάͰ͸ Rolling Update ‘ kayac/ecspresso ΋ Blue/Green Deployment ඇରԠʢͩͬͨʣ ‘ 2019/10/15 ʹαϙʔτ ‘ Ҏલ͔Β CircleCI-Public/aws-ecs-orb Λར༻͍ͯͨ͜͠ͱ΋͋ Γɺ·ͣ͸ Issue Λग़ͯ͠ΈΔ͜ͱʹ https://github.com/kayac/ecspresso/pull/47
  6. ίʔσΟϯάظ ‘ ͱ͍ͬͯ΋ॻ͘ͷ͸ YAML ͱ؆୯ͳ Shell ‘ JavaScript ͷ Templete

    Engine Ͱ͋Δ Handlebars ϑΝΠϧΛฤू ‘ ֤ Parameter ͷ Description ΋ॻ͘ඞཁ͕͋ΔͨΊӳޠ͕Μ͹Δ ‘ ECS ΍ CodeDeploy ͷ API ʹؔ͢Δཧղ͕ਂ·Δ ‘ API Reference ΛಡΈࠐΉͨΊ
  7. ։ൃͷྲྀΕ 1. src/orb.yml.hbs Λฤू 2. build_orb.sh Ͱ src/orb.yml Λੜ੒ 3.

    circleci orb validate src/orb.yml Ͱ Validate 4. ݸਓ Orbs ʹ publish 5. ಈ࡞֬ೝʢˠͷਤ௨Γʹ͍͔֬͘ೝ ͷ܁Γฦ͠
  8. ͦͷޙ ‘ ๭ϓϩδΣΫτͰ໰୊ͳ͘Քಇத ‘ ࣗ෼͕ίϯτϦϏϡʔτͨ͠ OSS ͕׆༻͞Ε͍ͯΔͬͯŘŘ ‘ PR Merge

    ޙ΋ͪΐͪ͘ΐ͘ϨϙδτϦΛνΣοΫ͢ΔΑ͏ʹ ‘ Ѫண͕༙͘ ‘ kayac/ecspresso ͷ࣮૷΋ಡΜͰΈͨΓ
  9. ·ͱΊ ‘ OSS Λ࢖͏਎ͳΒ OSS ʹίϯτϦϏϡʔτ͠Α͏ ‘ ͍ͭ΋ͷԸฦ͠ͱ͍͏ҙຯͰ ‘ ཉ͍͠ػೳ͕͋Ε͹

    PR ग़ͦ͏/ࣗ෼Ͱ࡞Ζ͏ ‘ ϗϯτʹνϟϨϯδͯ͠Α͔ͬͨ ‘ ͍ͭ΋ʮαϙʔτ͍ͯ͠ͳ͍͔Β...ʯͱಀ͕͛ͪͩͬͨ ‘ ӳޠϜζ͍ ‘ ͚ͲͰ͖ͳ͍ͱ౔ඨʹ͢Βཱͯͳ͍͔Β΍Δ
  10. Q&A