Todoy
Todoy

Reputation: 1266

How to access google container registry across projects

I currently have two project stage and prod all my docker images are managed using container repository.

I would like to be able to deploy my images from prod to staging to app engine.

It looks like the best practices for this would be to create a service account that has access to google storage on prod.

I have done that but I'm not sure how to integrate that into my CI pipeline when I'm already logged into gcloud using a staging account. Also, how do I get app engine to pull from that repo?

Upvotes: 1

Views: 312

Answers (1)

petomalina
petomalina

Reputation: 2140

All images are indeed stored on a bucket called artifacts.[PROJECT-ID].appspot.com. When using CI, make sure that you either added project-wide Storage Object Viewer or defined this role for the service account directly on the bucket (or separately on files).

When using AppEngine, there is also a Service Account called [PROJECT-ID]@appspot.gserviceaccount.com. Try to give access to the bucket to this SA as well so it can pull images into AE.

Upvotes: 1

Related Questions