require-google-cloud-build-timeout-positive
Require Google Cloud Build timeout values to be positive durations.
Targeted pattern scopeâ
- Root-level
timeout:values incloudbuild.yamlorcloudbuild.yml.
What this rule reportsâ
This rule reports non-positive or malformed timeout values when a timeout:
key is present. A missing timeout key is not flagged here; use
require-google-cloud-build-timeout
to enforce timeout existence.
Why this rule existsâ
A zero or invalid timeout undermines predictable build behavior and can hide CI execution policy drift.
â Incorrectâ
timeout: 0s
steps:
- name: gcr.io/cloud-builders/npm
â Correctâ
timeout: 60s
steps:
- name: gcr.io/cloud-builders/npm
When not to use itâ
Disable this rule if timeout policy is intentionally managed outside committed Cloud Build configuration.
Rule catalog ID: R097