Defining your own triggers
Pre-built integrations are very helpful for getting started quickly. However, they are not the only way to integrate with Cloud Build. You can leverage other mechanisms such as a manual or webhook trigger in order to integrate with existing systems or platforms that currently are not yet pre-built in Cloud Build.
Webhook triggers
An example we will be running through is a webhook trigger and we will be using GitLab as an example. Native integration with GitLab offerings are on the way as noted earlier in the chapter.
Figure 5.3 – An example of webhook trigger creation
Let’s break down the webhook URL:
- Domain:
cloudbuild.googleapis.com
- Google Project ID
- Trigger Name:
packt-cloudbuild-gitlab-trigger
- Type: webhook
- Key: generated API key
- Secret: generated secret when specifying New or an existing secret such as a password
In the example URL noted previously, we have a standard domain...