shahargalon / book-store

0 stars 0 forks source link

Build the image on GCP #5

Closed nirgn975 closed 4 years ago

nirgn975 commented 4 years ago

The next step is the CD, but let's break it down to couple of parts. In this issue you just build the docker image (with GCP cloud build), and push it (to save it) on GCP container registry.

So, this means you on need to create a trigger on cloud build, so every commit on master branch will trigger a build on cloud build. Then in the cloudbuild.yml you need couple of steps, to build the docker image and then to push it to the container registry. that's it for now.

In this PR you'll need to upload some screenshots so I'll see everything is working on GCP (maybe check if you can share with me the project on GCP so I'll have access and I can see things).

Here is an example of one of my projects container registry, you can see I have 3 directories there (for 3 different services, with 3 different CD scripts, triggers, and 3 different GitHub repos): Google_Cloud_Platform

And you can see here in the cloud build, 3 triggers: Triggers_–_Cloud_Build_–_Raptor_–_Google_Cloud_Platform

Here is one of the triggers (you can see I triggered a build on push of a tag, you need on every push to master branch): Edit_trigger_–_Cloud_Build_–_Raptor_–_Google_Cloud_Platform