Invalid Bucket Error in Cloud Build - Permission Issues or Configuration Change?

I'm encountering an "invalid bucket" error in Cloud Build. My Cloud Build project previously functioned without explicitly configuring buckets, but now it seems to require one. I'm unsure if this is due to a recent change in Cloud Build behavior or a configuration difference between my old and new projects.

Here's what I've observed:

  • Free Trial Status: I'm currently within the free trial period with a $300 credit.
  • Old Project: My Cloud Build workflow in the old project didn't explicitly mention a bucket for logs.
  • New Project: I'm getting the "invalid bucket" error in my new project's Cloud Build trigger.
  • Cloud Storage Bucket: I don't see any buckets named "cloudbuild-logs" in my new project's Cloud Storage section.

Troubleshooting Steps Taken:

  • I've reviewed the Cloud Build trigger configuration in the new project, but there's no mention of a specific bucket.
  • I checked the Cloud Storage section and haven't found a bucket named "cloudbuild-logs".

Possible Causes (as I understand):

  • Default Bucket Change: Cloud Build's default behavior for log storage might have changed, requiring a dedicated bucket now.
  • Missing Configuration: My old project might have used a temporary or project-specific location for logs, or exported them to Stackdriver Logging.

Question:

  • How can I troubleshoot the "invalid bucket" error in my new Cloud Build project?
  • Should I create a bucket named "cloudbuild-logs" in a specific region?
  • Are there alternative approaches for log storage in Cloud Build, especially if my old project didn't use a dedicated bucket?

Additional Information:

  • I'm using the free tier of Cloud Build.
  • I'm not sure if Stackdriver Logging was used for logs in the old project.

I hope to receive insights from the community to resolve the "invalid bucket" error and ensure my Cloud Build workflow functions correctly in my new project

Thanks

0 1 212
1 REPLY 1

Hello @moes

Welcome to Google Cloud Community!

There was a problem wherein new projects that have not yet successfully run a build in Google Cloud Build are failing with the error "Invalid bucket."

You can do the following workaround for this issue:

  1. If your project does not have a compute service account, try to enable the GCE (Google Compute Engine) API in your project to create the service account. This should result to your builds to work.
  2. Try running the build with the logging option CLOUD_LOGGING_ONLY. See this documentation.

If the above options don't work, you can contact Google Cloud Support to further look into your case. Hope it helps, thanks!