I try to use cloudbuild with yaml file and the command in the file is look like this
steps:
options:
logging: CLOUD_LOGGING_ONLY
# Build container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/backend', '.']
# Push container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/backend']
# Deploy container image to Cloud Run
- name: gcr.io/cloud-builders/gcloud
args: ['beta',
'run',
'deploy',
'backend',
'--image',
'gcr.io/$PROJECT_ID/backend',
'--region',
'asia-southeast2',
'--platform',
'managed',
'--allow-unauthenticated']
images:
- 'gcr.io/$PROJECT_ID/backend'
I face an error message in the cloudbuild like this "Your build failed to run: failed unmarshalling build config cloudbuild.yaml: yaml: line 5: did not find expected key"
I have the similar problem in this discussion Error publishing source code from cloud build to a bucket using triggers