Get startedGet started for free

Cloud Build and GKE

1. Cloud Build and GKE

In a CI/CD pipeline, the build stage refers to when raw source code is transformed into a deployable package. The process typically involves fetching dependencies, compiling the code, and packaging the application. To help with this process, Google offers Cloud Build, which is a service that can execute builds on Google Cloud infrastructure, an on-premises environment, or a combination of the two. Cloud Build can import source code from a variety of repositories or Cloud Storage spaces, execute a build to defined specifications, and produce artifacts such as container images. Cloud Build can be customized to automatically start the build process in response to specific changes in your code. This automation is achieved through predefined triggers, which define the specific events that will initiate a build. Cloud Build can also be used to execute the code provided by solutions like Terraform and Helm and can orchestrate many types of services from data to IoT pipelines. The build process can happen sequentially or in parallel. The build process starts by mounting a common volume named workspace. Then the source code of an application is added to this volume. Cloud Build creates each of the build steps as independent containers. This allows each content to operate on the common workspace. This environment reduces the need for redundant data stores. The build process is typically triggered by a change in your code repository. This change produces artifacts like containers or binaries. Any container can be used as a build container in Cloud Build. Google provides prebuilt containers that do not need modification, or you can choose from a curated repository of containers created by the Google Cloud community. These containers are available at no cost. Build steps are outlined in a configuration YAML file. In this example, an NPM container installs and tests the application, and a Docker container creates the application container and adds it to the container registry. After you submit the YAML file, Cloud Build creates the pipeline and executes the container so that it can be run in the cloud. The container is then added to Artifact Registry, a fully-managed, secure, and scalable artifact repository for storing, managing, and distributing build artifacts. For more advanced continuous deployment pipelines, you can trigger a Cloud Deploy release.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.