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

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

yamacraft
February 20, 2018

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

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

yamacraft

February 20, 2018
Tweet

More Decks by yamacraft

Other Decks in Technology

Transcript

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

    View full-size slide

  2. profile
    • @yamacraft (Wataru Yamada)
    • Mobile Application Engineer
    • LeadingMark, inc
    • team Y.G.E.(private)
    • 27wins / BestTime 25min →

    View full-size slide

  3. Try Wave
    https://try-wave.leadingmark.jp/

    View full-size slide

  4. Try WaveͰར༻த
    • Hosting
    • Authentication
    • Realtime Database
    • Cloud Functions
    • (FirebaseUI-webʴVue.js)

    View full-size slide

  5. Ͳ͏΍ͬͯ
    σϓϩΠ͍ͯ͠Δ͔

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  8. ඇϩάΠϯͰ΋FirebaseCLIΛ
    ࢖͑ΔΑ͏ʹ͢Δ
    • ʮlogin:ciʯͰೝূ༻ͷtokenΛൃߦ͢Δ
    • ൃߦ͢ΔͱɺඇϩάΠϯͰ΋ʮ--token {token}ʯͰ֤ίϚϯυ
    ͕࢖͑ΔΑ͏ʹͳΔ
    • token͸FirebaseϓϩδΣΫτͰ͸ͳ͘GoogleΞΧ΢ϯτʹඥ
    ෇͍ͨ৘ใͳͷͰ஫ҙʂ
    • tokenͷແޮԽ͸ʮlogout —token {token}ʯ
    • ൃߦͨ͠tokenͷҰཡΛ஌Δํ๏͸…஌Βͳ͍

    View full-size slide

  9. firebase deployʹ͍ͭͯ
    • firebase deploy͸ɺ1ͭͰ΋σϓϩΠʹࣦഊ͢Δ
    ͱଞͷtargetͷσϓϩΠ΋൓ө͞Εͳ͘ͳΔ
    • hosting্Ͱ͸௚લͷσϓϩΠʹϩʔϧόοΫ͞
    Ε͍ͯΔ
    • ଞͷ݁Ռʹؔ܎ͳ࣮֬͘ʹdeploy͍ͤͨ͞৔߹
    ͸ɺ--only Ͱબͼ·͠ΐ͏

    View full-size slide

  10. Alpine্Ͱfirebase-tools͕
    ΠϯετʔϧͰ͖ͳ͍ʢղܾࡁʁʣ
    • firebase-toolsͰར༻͢Δgrpc͕Alpine༻ͷό
    ΠφϦΛΞοϓϩʔυ͍ͯ͠ͳ͍͜ͱ͕͋Δ
    • ιʔείϯύΠϧ؀ڥΛ༻ҙ͓͚ͯ͠͹ಈ͘
    ͔΋ʢະݕূʣ
    • ݱࡏʢ3.17.4ʣͰ͸໰୊ͳ͘ಈ͕͘ɺΠϝʔ
    δͰར༻͢Δͷ͸ආ͚ͨํ͕͍͍͔΋

    View full-size slide

  11. ΋͏ͪΐͬͱ͍Ζ͍Ζॻ͍ͯ·͢
    'JSFCBTFϓϩδΣΫτͷσϓϩΠʹ͍ͭͯ2JJUB
    IUUQTRJJUBDPNZBNBDSBGUJUFNT
    ECDDFCDC

    View full-size slide