GoogleCloudPlatform / appengine-ruby

Optional integration library for the Ruby runtime for Google App Engine
Apache License 2.0
53 stars 21 forks source link

Add CLOUD_BUILD_GCS_LOG_DIR option to read cloud build logs #35

Closed katsuyan closed 3 years ago

katsuyan commented 4 years ago

It faild reading the cloud build logs When GAE_EXEC_STRATEGY is cloud_build.

ERROR: (gcloud.container.builds.submit) HTTPError 403: <?xml version='1.0' encoding='UTF-8'?><Error><Code>AccessDenied</Code><Message>Access denied.</Message><Details>circleci@project.iam.gserviceaccount.com does not have storage.objects.get access to PROJECT_ID.cloudbuild-logs.googleusercontent.com/log-xxxxxxxxxxxxxxx.txt.</Details></Error>

I found the following Github issue.

https://github.com/GoogleCloudPlatform/cloud-builders/issues/120

So, I add CLOUD_BUILD_GCS_LOG_DIR option to add --gcs-log-dir option for gcloud command.

Usage

bundle exec rake CLOUD_BUILD_GCS_LOG_DIR="gs://appengine-katsuyan-test/cloudbuild" appengine:exec -- bundle exec rails db:migrate
googlebot commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

katsuyan commented 4 years ago

@googlebot I signed it!

googlebot commented 4 years ago

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.