I am getting the following error in my google cloud build
Failed to trigger build: failed unmarshalling build config cloudbuild.yaml: yaml: line 12: could not find expected ':'
I can not pinpoint where exactly I am missing :
in my cloudbuild.yaml
file
steps:
# Install
- name: "gcr.io/cloud-builders/npm"
args: ["install"]
# Update submodules
- name: "gcr.io/cloud-builders/git"
entrypoint: "bash"
args:
- "-c"
- |
git config -f .gitmodules submodule.myprojectsubmodule.url https://source.developers.google.com/p/myproject/r/github_myprojectsubmodule
git submodule init
git submodule update
# Lint
- name: "gcr.io/cloud-builders/npm"
args: ["run", "lint"]
# Test
- name: "gcr.io/cloud-builders/npm"
args: ["run", "test"]
# Build
- name: "gcr.io/cloud-builders/gcloud"
args:
- kms
- decrypt
- --ciphertext-file=.env.enc
- --plaintext-file=.env
- --location=global
- --keyring=myproject
- --key=cloudbuild-env
- name: "gcr.io/cloud-builders/npm"
args: ["run", "build"]
# Deploy
- name: "gcr.io/cloud-builders/npm"
args: ["run", "deploy"]
I have added # Update submodules
step using the following comment https://github.com/GoogleCloudPlatform/cloud-builders/issues/26#issuecomment-463465138
# Build \n - name: gcr.io/cloud-builders/gcloud
... could be the cause ? – Thierry Falvo- name
tag. – zaqgit
commands should be aligned under the pipe symbol. I check your yaml format with codebeautify.org/yaml-validator, before and after the correction. – Thierry Falvo