Mohammad Elsayed
Mohammad Elsayed

Reputation: 2066

Cloudbuild service account doesn't have access to projectID

I am trying to automate building android application apks following in that quest this link: https://cloud.google.com/community/tutorials/building-android-apk-with-cloud-build-gradle-docker-image?fbclid=IwAR1z_1U0MHHqKJ57EeN__bLRDdq1kMQmK068gYmlt23mBtRfFoITg9qCKuM

I did everything in the link, granted all possible permissions to the cloudbuild service accound but each time I make a new push to the repository it fails generating new apk with the following error:

generic::failed_precondition: cloudbuild service account doesn't have access to projectID "lustrous-bit-271019"

I couldn't find anyone mentioning this anywhere which means it's stupid mistake because I am newbie, thanks in advance.

Upvotes: 0

Views: 432

Answers (1)

Mohammad Elsayed
Mohammad Elsayed

Reputation: 2066

I found the solution, I needed to add the role:

Cloud Build Service Account

to the account:

[PROJECT_ID]@cloudbuild.gserviceaccount.com

Upvotes: 1

Related Questions