I cant seem to get my bitbucket-pipelines.yml to validate for some reason.
https://bitbucket-pipelines.prod.public.atl-paas.net/validator
pipelines:
tags:
v*:
- step:
name: Test
image: node:8.9-alpine
caches:
- node
script:
- npm install
- npm test
- step:
name: Build & Push image to GCR
image: google/cloud-sdk:alpine
services:
- docker
script:
- export IMAGE=$IMG_NAME:$BITBUCKET_TAG
- docker build -t $IMAGE .
- docker tag $IMAGE $GCLOUD_REGION/$GCLOUD_PROJECT_ID/$IMAGE
- echo $GCLOUD_API_KEYFILE | base64 --decode --ignore-garbage > ./gcloud-api-key.json
- gcloud auth activate-service-account --key-file gcloud-api-key.json
- gcloud config set project $GCLOUD_PROJECT
- gcloud docker -- push $GCLOUD_REGION/$GCLOUD_PROJECT_ID/$IMAGE
Could anyone point me out what is wrong, because that validator is not helping...
Thanks
EDIT: cant seem to submit an answer because of a bug:
And yes I did spam the answer button multiple times because of this aggravating bug.
You are missing indentation of everything under "step":
pipelines:
tags:
v*:
- step:
name: Test
image: node:8.9-alpine
caches:
- node
script:
- npm install
- npm test
Also take a look at using YAML anchors for better readability and re-using definition blocks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.