Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloudbuild - Grant Permissions to Retry Builds

Is there a way to give developers the permissions to retry failed builds but not create new builds? Perhaps a new permission like `cloudbuild.builds.retry` will be useful for this unless there's a workaround.

0 2 227
2 REPLIES 2

Hi @azunna1,

I understand the need to allow developers to retry failed builds without granting them permission to create new ones. I recommend proposing a new permission like cloudbuild.projects.builds.retry to enhance our control over build management while still empowering our developers.

You can check out the Google Cloud documentation on IAM roles and permissions for Cloud Build for guidance. In the meantime, you may into custom roles to allow retries while restricting new build creation.

I hope the above information is helpful.

"In the meantime, you may into custom roles to allow retries while restricting new build creation." Yes but this is not possible because there are no supported resource attributes for cloudbuild in the IAM conditons -  https://cloud.google.com/iam/docs/conditions-resource-attributes#resource-name 
The solution i thought of using is to use an organisational constraint but that only makes sense for Trigger resources not Builds.

How do i make the new permission proposal?