I'm trying to build and deploy an image on GCP with cloud build. I have a rails api repo on bitbucket running on docker, the repo is synced with google cloud repository
I configured a trigger on cloud build when a commit is made on my master branch.
Trigger Configuration:
Service account permissions:
But when the master branch gets a commit, the triggers returns the following error:
our build failed to run: <br>Couldn't read commit xxxxxxxx
Build Error:
I tried checked the GCP doc and I can't find anything. I think the issue might be on the IAM level, maybe the service account needs more credentials.
For me the Cloud Build API needed to be enabled. Once I did this my build ran, I didn't need to do anything special for permissions.
I actually edited the IAM setting for this service account to add: Project > Editor Source Repository > Reader
Now it works