Unable to escape backtick in pipeline commands

I seem to be unable to escape backticks in commands in a drone pipeline (v0.8). None of the commands below seem to work and yield the usual error: “/bin/sh: syntax error: EOF in backquote substitution” - I’ve tried different counts of backticks, backslashs, and other odd ways of escaping the backticks. I can probably resolve the issue by writing my commands as a script, but I feel like this should be able to be escaped without needing to go down into another shell script.

pipeline:
test-escape:
group: start
image: alpine
commands:
- echo ‘```Console’
- echo ‘```Console’
- echo ‘\\\\Console' - echo '\\\\`\`Console’

Had the same problem right now. Workaround for now was to externalize the script from .drone.yml to myscript.sh and call the later from .drone.yml.

Instead of escaping, you can use a yaml scalar. For example:

commands:
- |
  echo `hello world`

Good point. Thanks, Brad.

Trying to print ``` to post a markdown comment, but there seems to be some kind of parsing that’s going on that makes odd number backticks not work, with or without scalars:

---
kind: pipeline
type: docker
name: even

clone:
  disable: true

steps:
  - name: works
    image: alpine:latest
    commands:
      - |
        printf "\`\`" > scalar.txt
      - cat scalar.txt
      - printf "\`\`" > reg.txt
      - cat reg.txt
---
kind: pipeline
type: docker
name: odd

clone:
  disable: true

steps:
  - name: broken
    image: alpine:latest
    commands:
      - |
        printf "\`\`\`" > scalar.txt
      - cat scalar.txt
      - printf "\`\`\`" > reg.txt
      - cat reg.txt

event pipeline


odd pipeline