I have two GCP projects. 1. manager and 2. dev. I created a trigger in manager to run the build process of my service and I want to execute/show the build status in dev project. So, trigger will be in manager and build run will be in dev
I used this command to do this:
gcloud builds submit --project=dev --config=build.yaml
So, after using this command, from manager I can successfully run the trigger and can see the build status on dev project. In dev the build status is succeeded but in manager project the status shows failed, I tried to see the logs, here is the message I got:
- The build is running, and logs are being written to the default logs bucket.
- This tool can only stream logs if you are Viewer/Owner of the project and, if applicable, allowed by your VPC-SC security policy.
- The default logs bucket is always outside any VPC-SC security perimeter.
- If you want your logs saved inside your VPC-SC perimeter, use your own bucket.
See https://cloud.google.com/build/docs/securing-builds/store-manage-build-logs.
Note that I gave my service account these access:
- Viewer
- Storage Admin
- Storage Object Viewer
- Logs Viewer
I don't understand why it is failing in manager but passed in dev and how to fix it.
Please suggest me what I should do in this scenario ?