Yaml double colon parse error


drone-cli (v 1.0.8) is given me parsing error when my string field have double colon.
Here my pipeline:

    image: plugins/slack
    webhook: "https://hooks.slack.com/services/AJAJSJSNSNS"
    icon_emoji: ":robot_face:"
      status: ["success", "failure"]
    template: >
      {{#success build.status}}
        [{{repo.name}}] @{{build.author}} build {{build.number}} succeeded. Good job. :robot_face: :party_parrot:
        [{{repo.name}}] @{{build.author}} build {{build.number}} failed. Fix me please. :fire:

Here icon_emoji with value :robot_face: have the parser error

My command:

drone exec --include slack --repo test

The output:

yaml: line 13: mapping values are not allowed in this context

Any idea how to solve that?

My env:
Mac OS 10.3.6
Install drone with HomeBrew

It looks like you are using Drone 0.8 (based on the syntax) so you should use an 0.8.x version of the command line utility.

I downloaded it today
I execute from my cli:

drone -v

And get

drone version 1.0.8

Downloaded with brew or curl have the same problem for me.

Right … the version of the CLI you downloaded is too new for the yaml syntax you are using.

Based on the yaml syntax you are using (which is the legacy 0.8 syntax) you need to install the 0.8.x version of the CLI [1]. To be more precise, you probably want this version:

$ drone version

[1] https://github.com/drone/drone-cli/releases/tag/v0.8.6

1 Like

You are right. The problem is the binary version.

Now i realize about versions and yaml specifications compatibilities. May drone need version field in yaml like docker-compose. For now switch to 0.8.6 and work fine.

Thanks @bradrydzewski