Firebase関連をCIでデプロイするときのTips

Ad37f739bffa0e38c8461e452cb3a489?s=47 yamacraft
February 20, 2018

 Firebase関連をCIでデプロイするときのTips

2018/02/20(火)にクックパッドで開催したFirebase.yebisu #2にて発表したLTの資料です

Ad37f739bffa0e38c8461e452cb3a489?s=128

yamacraft

February 20, 2018
Tweet

Transcript

  1. Firebaseؔ࿈ΛCIͰ σϓϩΠ͢Δͱ͖ͷTips @yamacraft

  2. profile • @yamacraft (Wataru Yamada) • Mobile Application Engineer •

    LeadingMark, inc • team Y.G.E.(private) • 27wins / BestTime 25min →
  3. Try Wave https://try-wave.leadingmark.jp/

  4. Try WaveͰར༻த • Hosting • Authentication • Realtime Database •

    Cloud Functions • (FirebaseUI-webʴVue.js)
  5. Ͳ͏΍ͬͯ σϓϩΠ͍ͯ͠Δ͔

  6. CIͰࣗಈతʹ΍͍ͬͯ·͢

  7. CircleCI2.0Ͱ σϓϩΠ͢ΔͨΊʹඞཁͳ Tips

  8. ඇϩάΠϯͰ΋FirebaseCLIΛ ࢖͑ΔΑ͏ʹ͢Δ • ʮlogin:ciʯͰೝূ༻ͷtokenΛൃߦ͢Δ • ൃߦ͢ΔͱɺඇϩάΠϯͰ΋ʮ--token {token}ʯͰ֤ίϚϯυ ͕࢖͑ΔΑ͏ʹͳΔ • token͸FirebaseϓϩδΣΫτͰ͸ͳ͘GoogleΞΧ΢ϯτʹඥ

    ෇͍ͨ৘ใͳͷͰ஫ҙʂ • tokenͷແޮԽ͸ʮlogout —token {token}ʯ • ൃߦͨ͠tokenͷҰཡΛ஌Δํ๏͸…஌Βͳ͍
  9. firebase deployʹ͍ͭͯ • firebase deploy͸ɺ1ͭͰ΋σϓϩΠʹࣦഊ͢Δ ͱଞͷtargetͷσϓϩΠ΋൓ө͞Εͳ͘ͳΔ • hosting্Ͱ͸௚લͷσϓϩΠʹϩʔϧόοΫ͞ Ε͍ͯΔ •

    ଞͷ݁Ռʹؔ܎ͳ࣮֬͘ʹdeploy͍ͤͨ͞৔߹ ͸ɺ--only <targets>Ͱબͼ·͠ΐ͏
  10. Alpine্Ͱfirebase-tools͕ ΠϯετʔϧͰ͖ͳ͍ʢղܾࡁʁʣ • firebase-toolsͰར༻͢Δgrpc͕Alpine༻ͷό ΠφϦΛΞοϓϩʔυ͍ͯ͠ͳ͍͜ͱ͕͋Δ • ιʔείϯύΠϧ؀ڥΛ༻ҙ͓͚ͯ͠͹ಈ͘ ͔΋ʢະݕূʣ • ݱࡏʢ3.17.4ʣͰ͸໰୊ͳ͘ಈ͕͘ɺΠϝʔ

    δͰར༻͢Δͷ͸ආ͚ͨํ͕͍͍͔΋
  11. ΋͏ͪΐͬͱ͍Ζ͍Ζॻ͍ͯ·͢ 'JSFCBTFϓϩδΣΫτͷσϓϩΠʹ͍ͭͯ2JJUB IUUQTRJJUBDPNZBNBDSBGUJUFNT ECDDFCDC

  12. ͓͠·͍