Setting up your environment
In the previous chapter, we reviewed a build using a simplified version of the following cloudbuild.yaml
config file, which can be found at https://github.com/GoogleCloudPlatform/cloud-build-samples/tree/main/basic-config.
This build configuration file defines three individual build steps that are carried out sequentially:
- Build a Docker container image.
- Push the Docker container image to Artifact Registry (https://cloud.google.com/artifact-registry).
- Create a Compute Engine (https://cloud.google.com/compute) VM and deploy the previously built container image to the newly created VM.
Additionally, we can look at a visual representation of the build here:
Figure 4.1 – A simple build that builds a container, pushes it to a registry, and runs it on a new VM
The contents in Google Cloud Platform’s GitHub repositories might change over time, so let’s create our own copy of the files needed...