require-google-cloud-build-config-file
Require a Google Cloud Build configuration file in repositories using the Google Cloud preset.
Targeted pattern scopeâ
- Repositories that opt into the Google Cloud preset without committing
cloudbuild.yaml,cloudbuild.yml, orcloudbuild.json.
What this rule reportsâ
This rule reports repositories using the Google Cloud preset when no Cloud Build config file is committed.
Why this rule existsâ
A committed Cloud Build config keeps build and deploy behavior reviewable in the repository instead of scattering it across console-only settings.
â Incorrectâ
// Repository enables Google Cloud policy but does not commit cloudbuild.yaml.
export default [];
â Correctâ
# cloudbuild.yaml
timeout: 1200s
steps:
- name: gcr.io/cloud-builders/npm
args: ["test"]
When not to use itâ
Disable this rule if the repository does not use Google Cloud Build.
Rule catalog ID: R066