I'm getting an error that is mentioned a few times here, however I am using the option in the UI to use a Dockerfile. The configuration options are use a cloudbuild file OR a Dockerfile. Does this not actually work? I would expect the build trigger to use my Dockerfile when running, but it seems to be looking for cloudbuild instructions which don't exist.
The error I'm getting is the following:
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
However, I am not using the Cloud Build configuration file (yaml or json) option.
Solved! Go to Solution.
Thanks for the response, but we just ended up moving back to github actions.
Hi @katris,
Welcome to Google Cloud Community!
It seems that the service account you are using for Cloud Build doesn't have the right permissions. Confirm that the builder service account has the roles/logging.admin role to store build logs and use all of the actions in Logging.
The builder service account must also have access to create and write to Cloud Storage buckets in the build project. Grant the roles/compute.storageAdmin role to your service account.
You can also view your build logs for each individual build step and overall status
I hope the above information is helpful.
The service has the mentioned roles but the trigger can't be launched as we get the same error. Currently CloudBuild is unusable for docker files.
Failed to trigger build: 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
Thanks for the response, but we just ended up moving back to github actions.