CI Lint validates faulty config

Summary

When using the CI Lint functionality of Gitlab to validate a correct CI config, we ran into a situation where the linter says the syntax is valid, while in reality it is not, and pipelines fail on the line which the Linter denotes as valid. It seems that the Linter does not pickup wrong indentation.

Steps to reproduce

Have a CI file with a stage having a script containing of multiple lines. So, each item starts with - . Now add an extra space in front of the not-first line.

What is the current bug behavior?

The wrongly indented line gets added to the previous line/command.

What is the expected correct behavior?

The linter should complain that the indentation is wrong, as it should be a separate line/command which is wrongfully indented.

Relevant logs and/or screenshots

Example of wrong .gitlab-ci.yml file which passes the linter, but fails on execution. Note the second line under script which is indented wrongly:

stages:
  - deploy

usermgmtscripts:
  stage: deploy
  script:
    - CWD=$(pwd)
     - python $(pwd)/config/scripts/get_certificates.py
    - python $(pwd)/config/scripts/get_credentials.py

Output of linter:

Screen_Shot_2017-04-19_at_11.51.54

Happens on our GitLab 9.0.5 Enterprise Starter instance.

Assignee Loading
Time tracking Loading