firebase-tools & Google Cloud Identity / Firebase Summit 2018

B1a92722c01c73a58b8db38094a3f23e?s=47 Futa Ogawa
November 14, 2018

firebase-tools & Google Cloud Identity / Firebase Summit 2018

小川楓太 - DMM.com LLC

2018/11/15
Firebase Summit 2018 報告会 - Firebase Japan User Group
https://firebase-community.connpass.com/event/103193/

#FJUG #FirebaseSummit

B1a92722c01c73a58b8db38094a3f23e?s=128

Futa Ogawa

November 14, 2018
Tweet

Transcript

  1. firebase-tools & Google Cloud Identity #FirebaseSummit #2018

  2. • 1995೥ੜ·Εͷ23ࡀ • ޷͖ͳςΫϊϩδʔ • TypeScript • Firebase • CDN

    • HLS খ઒෨ଠ @ogawa0071 DMM.comάϧʔϓ ձ௕ࣨ
  3. GoogleͷσβΠφʔʹΞΠίϯ࡞ͬͯ΋Β͍·ͨ͠

  4. None
  5. None
  6. Firebase Summit 2018

  7. None
  8. #AskFirebaseͰฉ͍͖ͯ·ͨ͠

  9. https://firebase-jp.slack.com/messages/C819VPH4M/

  10. ͜Ε·Ͱ

  11. $ git push $ firebase deploy \ --only hosting \

    ϩʔΧϧ͔ΒσϓϩΠ
  12. $ git push Webhook $ firebase deploy \ --only hosting

    \ --project $FIREBASE_PROJECT \ --token $FIREBASE_TOKEN CI͔ΒσϓϩΠ
  13. $ git push Webhook $ firebase deploy \ --only hosting

    \ --project $FIREBASE_PROJECT \ --token $FIREBASE_TOKEN CI͔ΒσϓϩΠ
  14. τʔΫϯͷ࡞੒ $ firebase login:ci

  15. τʔΫϯͷ࡞੒ $ firebase login:ci ✔ Success! Use this token to

    login on a CI server: XXXXXXXXXXXXXXXXXXXX Example: firebase deploy --token "$FIREBASE_TOKEN"
  16. τʔΫϯͷ࡟আ $ firebase logout --token $FIREBASE_TOKEN

  17. τʔΫϯͷ࡟আ $ firebase logout --token $FIREBASE_TOKEN ✔ Logged out token

    "XXXXXXXXXXXXXXXXXXXX"
  18. τʔΫϯͷ໰୊ •Google AccountͰͷΈ࡞੒Ͱ͖Δ •Service AccountͰ࡞੒Ͱ͖ͳ͍ •࡞੒ͨ͠Google Account͕࡟আ͞Εͨ৔߹CI͕յΕΔ •࡞੒ͨ͠τʔΫϯͷҰཡ͕දࣔͰ͖ͳ͍

  19. τʔΫϯͷ໰୊ •Google AccountͰͷΈ࡞੒Ͱ͖Δ •Service AccountͰ࡞੒Ͱ͖ͳ͍ •࡞੒ͨ͠Google Account͕࡟আ͞Εͨ৔߹CI͕յΕΔ •࡞੒ͨ͠τʔΫϯͷҰཡ͕දࣔͰ͖ͳ͍

  20. Google Cloud IAMͷߏ଄ https://cloud.google.com/iam/docs/overview

  21. Google Cloud IAMͷߏ଄ https://cloud.google.com/iam/docs/overview αʔόʔΞΧ΢ϯτʹ ઃఆ͢΂͖Identity

  22. Google Cloud IAMͷߏ଄ https://cloud.google.com/iam/docs/overview τʔΫϯ͕࢖͏Identity

  23. ͜Ε͔Β

  24. Release Today: firebase-tools v6.1.0

  25. None
  26. None
  27. After v6.1.0 $ export GOOGLE_APPLICATION_CREDENTIALS="[PATH]" $ firebase deploy --only hosting

    \ --project $FIREBASE_PROJECT
  28. None
  29. None
  30. None
  31. ΦϚέ •࣮͸Ҏલ͔Β $GCLOUD_PROJECT ͱ͍͏؀ڥม਺͸࢖༻ՄೳͰͨ͠ •͜Ε͸࢖༻͢ΔGoogle CloudͷϓϩδΣΫτΛࢦఆ͢Δ΋ͷ •`--project $FIREBASE_PROJECT` ͱ͍͏Α͏ͳࢦఆ͕ඞཁͳ͘ͳ Γ·͢