I'm working on my first cloudbuild.yaml file and running into this error:
Your build failed to run: failed unmarshalling build config cloudbuild.yaml: yaml: line 8: did not find expected key
Here are the contents of my file (comments omitted), I have a few questions afterwards:
steps:
- name: 'node:12-alpine'
entrypoint: 'bash'
args:
- 'build.sh'
- name: 'docker'
args:
- 'build'
- '-t'
- 'gcr.io/$PROJECT_ID/my-project:$(git describe --tags `git rev-list --tags --max-count=1`)'
images: ['gcr.io/$PROJECT_ID/my-project']
Questions:
- The line with
- name: 'node:12-alpine'seems to be where it's blowing up. However, the documentation states, "Cloud Build enables you to use any publicly available image to execute your tasks.". The node:12-alpine imgage is publicly available so what am I doing wrong? - Secondly, I'm trying to execute a file with a bunch of BASH commands in the first step. That should work, provided the commands are all supported by the Alpine image I'm using, right?
- Lastly, I'm trying to create a docker image with a version number based on the version of the latest git tag. Is syntax like this supported, or how is versioning normally handled with google cloud build (I saw nothing on this topic looking around)