Around 9/27 Cloud Build triggers from pub/sub topics started failing with the error
" Failed to trigger build: failed unmarshalling build config cloudbuild.yaml: json: cannot unmarshal string into Go value of type []json.RawMessage"
I’ve confirmed that cloudbuild.yaml is good using “gcloud builds submit .” . The build only fails from pubsub subscriptions.
cloudbuild.yaml
steps:
# Docker Build
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--build-arg', 'CLOUD_SDK_VERSION=${_CLOUD_SDK_VERSION}', '-t',
'us-west1-docker.pkg.dev/${PROJECT_ID}/gcloud-lite/gcloud-lite:latest',
'-t', 'us-west1-docker.pkg.dev/${PROJECT_ID}/gcloud-lite/gcloud-lite:${_CLOUD_SDK_VERSION}',
'.']
images: 'us-west1-docker.pkg.dev/${PROJECT_ID}/gcloud-lite/gcloud-lite'
options:
logging: CLOUD_LOGGING_ONLY
what I’ve tested
- tested cloudbuild.yaml is correct using
gcloud builds submit .. cloudbuild.yaml works properly - Re-created pub-sub trigger with cloud build trigger v2
- removed all substitutions to confirm the error is not due to parsing
- tested running the trigger manually from Cloud Build console. The trigger fails immediately with all invocations.