Automating builds
In the previous examples, we manually executed builds. Cloud Build can also start a build automatically using triggers (for example, a new commit to your source code repository).
Besides being invoked by repository-specific events, you can invoke triggers manually. You can link a trigger to a Pub/Sub topic so that the trigger runs upon receipt of a message on that topic. You can also expose a webhook URL for invocation.
In this section, we focus primarily on running builds after a specific repository event. To do that, you need to connect Cloud Build to a repository, as described next.
Creating your source code repository
Before connecting Cloud Build to a repository to automate builds when code is committed, you need a repository to which you will commit your code.
Perform the following steps to create a repository from the ch5
folder in this book’s repository:
- Create a new repository in your GitHub account, called
scdbook-ch5
. - Export...