I was updating some Cloud Build triggers and I’m not sure what changed – I think that the service account field when configuring a new build trigger is now mandatory because I don’t recall ever having to set that field before.
Also, this is the first time I’ve ever seen the below error:
Your build failed to run: generic::invalid_argument: if ‘build.service_account’ is specified, the build must either (a) specify ‘build.logs_bucket’, (b) use the REGIONAL_USER_OWNED_BUCKET build.options.default_logs_bucket_behavior option, or (c) use either CLOUD_LOGGING_ONLY / NONE logging options
Google Cloud Build
And the fix is obviously just to configure cloud logging in the cloudbuild.yaml file in my repository:
steps:
- name: "gcr.io/cloud-builders/gcloud"
args: ["app", "deploy", "--version", "1alpha"]
timeout: "1600s"
options:
logging: CLOUD_LOGGING_ONLY