Pipelines validator parses YAML inside quotes

Issue #18068 resolved
Florin Iacob created an issue

The pipelines validator seems to have started to parse yaml inside quotes.

I can't remember precisely testing this few months ago, but there are some vague memories that it didn't do that.

See attached screenshot.

One would need to use the colon ":" in a variable to be able to use it in strings (that's my only solution for now, since i really need to create this pipeline)

Update: see comment

Comments (7)

  1. Steven Vaccarella staff

    The easiest way to escape special characters in the script is to put single quotes around the entire line, eg:

      - 'echo "A string with: a colon"'

    If necessary you can embed a single quote by putting two in a row. No other characters will need extra escaping for yaml (you'll still need to do normal escaping for bash or other tools that will process the string within your build).

  2. Florin Iacob reporter

    @steven How should we mark the resolution on this one ? It's not technically a bug anymore, since this is actually the yaml spec says the parsing should behave, and quoting the array item is the proper way to handle such an item (containing a colon).

  3. Log in to comment