Exercise – implementing CI using Cloud Build
In this exercise, we will create a CI pipeline using Cloud Build. There will be four main steps, as follows:
- Creating a GitHub repository using a Cloud Source Repository.
- Developing the code and Cloud Build scripts.
- Creating a Cloud Build trigger.
- Pushing the code to the GitHub repository.
Let’s get started!
Creating a GitHub repository using a Cloud Source Repository
First, let’s prepare the GitHub repository. Follow these steps:
- Go to your GCP console and find Source Repository from the navigation bar. It’s located under the CI/CD section:
Figure 12.2 – The Source Repository option in the navigation menu
- After clicking the menu, a new browser tab will open within the Cloud Source Repository console. Click the Get started button on this screen to create a repository:
Figure 12.3 – The Get...