yamlgitlab-ci

Gitlab CI: "found unknown escape character" for call command &


I have a simple gitlab config file:

  script:
    - "& $env:P7_TESTING_INSTALLATION_PATH\client\p7batch.exe --log-level=error --run $env:CI_PROJECT_DIR\autotest\jobs\_clear.py"

Thats 12th and 13th lines. When I run my pipe the runner gives me that:

`.gitlab-ci.yml`: (): found unknown escape character while parsing a quoted scalar at line 13 column 7

I tried to quote the command but it didnt help as you can see...


Solution

  • I have found that "&" is not good for yaml deserialization, so I tried to replace it with "Powershell" and it has worked out!