I have a cloud build pipeline which builds and tries to deploy a multi-container service on Cloud Run.
The containers are:
- Frontend (exposed port 3000)
- Backend
I specified in the cloudbuild.yaml that frontend
depends on backend
:
args:
- beta
- run
- deploy
- $_SERVICE_NAME
- >-
--container=frontend
- >-
--image=$_AR_HOSTNAME/$PROJECT_ID/cloud-run-source-deploy/$REPO_NAME/$_SERVICE_NAME-frontend:$COMMIT_SHA
- --port=3000
- --depends-on=backend
However, this doesn’t build because of error:
spec.template.spec.containers[0].depends_on: Dependent container ‘backend’ must have startup probe specified
And I don’t see a way to specify the startup probe in the docs.
https://cloud.google.com/sdk/gcloud/reference/beta/run/deploy