Currently I'm deploying a CI/CD pipeline for a staging enviroment. The problem is, when it comes to execute the trigger and build the last version pushed to the "watched branch", Cloud Build gives me the following error (right after the Docker images were successfully built):
Solved! Go to Solution.
Hi Alexandre,
The Cloud Build service account needs actAs permissions to call the Cloud Deploy endpoint (which in turn uses the Cloud Deploy service account). You should grant your Cloud Build service account actAs permissions. The Cloud Build account should also have the clouddeploy.relesaer role. The service account you are using for Cloud Deploy to deploy should have the clouddeploy.jobRunner role.
Here are a few links:
Hi Alexandre,
The Cloud Build service account needs actAs permissions to call the Cloud Deploy endpoint (which in turn uses the Cloud Deploy service account). You should grant your Cloud Build service account actAs permissions. The Cloud Build account should also have the clouddeploy.relesaer role. The service account you are using for Cloud Deploy to deploy should have the clouddeploy.jobRunner role.
Here are a few links:
It worked. Many thanks!
Hello @sanderbogdan ,
I have a question, is it the same case in Deploying Apigee API Proxies?
I am creating a CI/CD pipeline to deploy Apigee API Proxies using Maven plugin, and the trigger failed giving nearly same error message:
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:2.4.0:deploy (default-cli) on project apigee-api-proxy: : MojoExecutionException: com.google.api.client.http.HttpResponseException: 403 Forbidden
[ERROR] {
[ERROR] "error": {
[ERROR] "code": 403,
[ERROR] "message": "permission 'iam.serviceAccounts.actAs' denied on resource 'projects/-/serviceAccounts/deployment-SA@my-project.iam.gserviceaccount.com' (or it may not exist in the project for Apigee org \"my-project\")",
[ERROR] "status": "PERMISSION_DENIED",
[ERROR] "details": [
[ERROR] "@type": "type.googleapis.com/google.rpc.RequestInfo",
[ERROR] "requestId": "11467981998970720566"
can you please explain to me why I need to assign the role Service Account User to the service account "deployment-SA@my-project.iam.gserviceaccount.com", where it is the service account I am using in the Cloud Build Trigger.
and what other service account it is trying to impersonate?