-1

I'm using this command to submit the build:

gcloud builds submit --tag gcr.io/[my-project]/[my-service]

This successfully submits the build and everything is correct in the Cloud Build tab in the GCP interface.

And this command to deploy:

gcloud beta run deploy [my-service]
--service-account [service-account]@[my-project].iam.gserviceaccount.com
--image gcr.io/[my-project]/[my-service]:latest --cpu 2 --memory 8Gi
--timeout 59m59s --vpc-connector=pyston-vpc-connector
--vpc-egress=private-ranges-only 
--set-cloudsql-instances=[my-project]:europe-west2:[my-instance]

This does 'successfully' deploy the service, as in there are no errors. However, it is not deploying using the latest build, it uses the last build submitted by someone else in my team.

I have tried deploying in the GCP interface as well but this led to the same outcome.

Any ideas on how t solve this?

Thanks!

  • Your question is like "How do I build a house" with no details on what type of house, how big it is, etc. Which means we do not know. Edit your question so that it can be answered with facts or citations. https://stackoverflow.com/help/how-to-ask Also read this link https://stackoverflow.com/help/on-topic – John Hanley May 16 '22 at 09:07
  • you could start by not using the latest tag of an image, but use the one tagged with a sensible version number – somethingsomething May 16 '22 at 09:28
  • @somethingsomething Thanks for the suggestion. On trying this I've realised the Container Registry Repository specified in the gcloud build submit command was incorrect, so the image being used when deploying was also incorrect. Thanks! – Matthew Best May 16 '22 at 09:52

1 Answers1

0

I was specifying the incorrect Container Registry Repository when submitting the build meaning the deployment couldn't find the latest image.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 18 '22 at 15:44