Fireship · @fireship

Cloud Build - Create a CI/CD Pipeline

Uploaded January 18, 2019 · Length 9:38

Cloud Build - Create a CI/CD Pipeline

Summary

Set up a CI/CD pipeline for a Firebase app using Google Cloud Build, automating testing, building, and deployment.

  • google cloud build
  • ci/cd pipeline
  • firebase app
  • continuous integration
  • continuous deployment
  • devops
  • automating deployment

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:06

    one of the most powerful ways to

  2. 0:08

    increase productivity is to automate in

  3. 0:10

    today's video you'll learn how to set up

  4. 0:12

    a continuous integration and delivery

  5. 0:13

    pipeline for a firebase app using google

  6. 0:16

    cloud build by the end of this video

  7. 0:18

    you'll be able to test build and deploy

  8. 0:20

    your app to firebase by simply

  9. 0:21

    committing your code to github if you're

  10. 0:23

    new here like and subscribe and follow

  11. 0:25

    along with the source code on fire ship

  12. 0:26

    IO you'll find additional pro tips and

  13. 0:28

    pointers in the full write-up so what is

  14. 0:30

    CI CD or DevOps as it's commonly called

  15. 0:32

    it really just boils down to automating

  16. 0:35

    anything and everything that you can

  17. 0:36

    between writing your code and deploying

  18. 0:38

    it to production this results in a whole

  19. 0:40

    wide range of benefits but most

  20. 0:41

    importantly it keeps your development

  21. 0:43

    code as close as possible to your

  22. 0:45

    production code so how does that work

  23. 0:47

    well it starts with a git repo whenever

  24. 0:49

    you commit code to this repo it will

  25. 0:51

    trigger a new build a build is just a

  26. 0:53

    docker container running in the cloud

  27. 0:54

    that does many of the same things that

  28. 0:56

    you would do locally like install your

  29. 0:57

    NPM dependencies test build and deploy

  30. 1:00

    to firebase this is exactly what we do

  31. 1:02

    for fire ship IO in addition to other

  32. 1:04

    things like updating our search index on

  33. 1:06

    algo Lea etc if the build fails at any

  34. 1:09

    step it will not deploy the final code

  35. 1:10

    and we'll know exactly where the problem

  36. 1:12

    lies and cloud build will give us

  37. 1:14

    detailed blogs that we can hopefully use

  38. 1:15

    to find the root of the problem so

  39. 1:18

    getting all this stuff set up is kind of

  40. 1:19

    painful in the beginning but once you

  41. 1:21

    have it set up you'll be very glad that

  42. 1:22

    you did for a fighter ship IO it pushes

  43. 1:24

    new code and content to the site almost

  44. 1:25

    every day and even as an independent

  45. 1:27

    developer that saves me a ton of time

  46. 1:28

    but just imagine how much time that

  47. 1:30

    would save a large team the adoption of

  48. 1:32

    C ICD has been kind of a macro trend for

  49. 1:34

    the last few years and there's a lot of

  50. 1:36

    really good services out there like

  51. 1:37

    Travis and circle so what are the

  52. 1:39

    advantages of Google cloud build the

  53. 1:41

    first obvious one is pricing it offers a

  54. 1:43

    hundred and twenty minutes of free build

  55. 1:45

    time per day which is probably way more

  56. 1:47

    than you need but if you exceed it

  57. 1:48

    becomes pay-as-you-go after that other

  58. 1:50

    CI services generally have a free tier

  59. 1:52

    but then it becomes a monthly fee after

  60. 1:53

    that which is usually over 50 bucks a

  61. 1:55

    month and because it's integrated with

  62. 1:57

    GCP it's really easy to connect other

  63. 1:59

    services for example we can just add I