I'm not sure why I can't specify what I thought was a simple name for the tags in the bitbucket-pipelines.yml
pipelines:
tags:
release-*:
Using the validator the only way I can make this valid it to use * for the name of the tag after tags:. Anything else, even a single word like release gives me the error "Expected a List". I can't seem to find anywhere that details how this should work for identifying tags.
Validator - https://bitbucket-pipelines.prod.public.atl-paas.net/validator
Hello @shilohuniversity,
Thanks for reaching out.
There's nothing wrong in the excerpt you posted. The validator is complaining on the missing content of release-* block: it has to be a list. That is, your config file is incomplete.
This is validated without any errors:
pipelines: tags: release-*: - step: script: - echo "Hello world"
Hope this helps.
Cheers,Daniil
Hi Daniil,
I was going fast and didn't actually add the entire script. Sorry for the confusion. Here is the whole script. Using release-* gives me an error in the validator:
pipelines: tags: release-*: -step: name: Deploy to Production deployment: Production script: - ssh -tt $USER@$DOMAIN << EOF - cd $URL - touch newfilefromtag.tmp - exit $? - EOF
As I typed this in I realized that my formatting was off. Missing spaces in certain places. YAML is very picky. Here is the corrected code for reference:
pipelines: tags: release-*: - step: name: Deploy to Production deployment: Production script: - ssh -tt $USER@$DOMAIN << EOF - cd $URL - touch newfilefromtag.tmp - exit $? - EOF
Didn't have a space in between the dash and step. Also, needs 4 spaces below the step before name:
Thanks for your help!
Glad that it worked!
Missing spaces in certain places. YAML is very picky.
Yeah, this is a tradeoff of its conciseness, compared to JSON.
By the way, aside from the online validator there's at least a couple of plugins I'm aware of for IDEs which might help with debugging/validating Pipelines config file locally:
Thanks! I just downloaded those plugins to try them out. Hoping that will help out with these formatting syntax errors in the future.
It looks like you're new here. Sign in or register to get started.