2

GitLab, you really should fix your CI.

I mean, I know .gitlab-ci.yml has to be written carefully, having in mind that GL shell is a castrated bourne shell, but come on... Failing a pipeline because I used a semicolon in an `echo` parameter string?

echo ""items: 0" ## this will fail
echo "items 0" ## this will pass

This is a bit too much.

Removed the semicolon and the pipeline worked just fine.

Comments
  • 8
    Thats's not Gitlab's fault, it's the YAML parser, it thinks that entry is an object with a key named «echo "Building kube extensions».

    Add single quotes around the entire entry and it should parse it correctly.
  • 2
    Which editor do you use? With VS Code´s YML syntax highlighter the issue would've been obvious immediately

    Also, are you building a gitlab runner deployed to Kubernetes in gitlab ci? :D
  • 3
    In fact you can clearly see in OP's screenshot that the Gitlab syntax highlighter is correctly highlighting the key and value parts.
  • 7
    Also it's colon
  • 3
    @melezorus34 you are technically correct, the best kind of correct.
  • 2
    ha.. then it must be my mistake. I didn't think a double-quote is a valid character in a yaml key.
  • 1
    @webketje vim :)

    > Also, are you building a gitlab runner deployed to Kubernetes in gitlab ci? :D

    yes. https://gitlab.com/netikras/KubICon
  • 2
    Encoding a script into a list of lines looks like asking for trouble to me. Better use a string block for that - if supported by GitLab.

    script: |

    Indented lines of script
  • 4
    Welcome to yaml files
  • 2
    Words cannot express how much I hate, hate, hate YAML with its fucked up ambiguous syntax, book-sized definition and the resulting scarcity of fully compliant parsers.
  • 1
    @lbfalvy i feel the same. At my work place everyone loves YAML and it's fucking therapeutic everytime I read the hate at DevRant.
  • 1
    @lbfalvy Apart from the references (asking for entity expansion bomb attacks), optional custom types (anyone ever used that?) and too lax key name rules, it actually is a relatively sane standard though. Definitely better than JSON and XML. But yes: Having to look up string block syntax every time sucks. There aught to be a way to dumb that down a bit.
Add Comment