The anatomy of a trigger
A Cloud Build trigger requires a few pieces of information at a minimum in order to be properly configured. A trigger requires the following data points:
- Name
- Region
- Event triggers (defaults to Push to a branch):
- Push to a branch
- Push new tag
- Pull request
- Other mechanisms
- Manual invocation – triggered via the GCP console or automated means (CLI, REST, or SDK)
- Google Cloud Pub/Sub message
- Webhook event – which is an HTTP post to a designated URL
- Source repository
- Source branch/tag:
- Regular expressions can be used to determine which branch/tag names trigger an event.
- Cloud Build configuration file (defaults to
cloudbuild.yaml
):- Dockerfile – if you want to build a container
- Buildpacks – which can detect the source code language and build a container based on the defined specification
Other fields can also play a vital role in helping to customize the trigger:
- Variables – used for substitution...