I have created a trigger from my repository in Google Cloud Repositories. When I attempt to run the build, it fails before starting and gives me the following error:
"Failed to trigger build: generic::failed_precondition: due to quota restrictions, cannot run builds in this region"
There's no way I am exceeding any quotas because I have never successfully run a build. Everything is set up in the same region.
I do see that this quota "concurrent Build CPUs (Regional Public Pool) per region per build_origin" is defaulted to zero. I requested to increase it, but I am not sure this will fix the problem. Everything else is set with a limit ≥1 and I am below quotas for everything having to do with Cloud Build API.
Solved! Go to Solution.
This was basically it - I had one quota for Cloud Build API set to 0: "Concurrent Build CPUs (Regional Public Pool) per region per build_origin." There was no region attribute, so it was being applied to all regions. I asked to increase that which took a few days; when it was approved my build worked right away.
If anyone else has this problem - go to IAM & Admin in the cloud console. Scroll down to Quotas in the left hand sidebar and click that. Then add a filter "Service:Cloud build API". Then scroll through all the available quotas and see if any are set at 0. You can then put in a request to increase that quota if it looks like it could be the issue.