Skip to content

"Validate GitLab CI config" requires project for local file import

Summary

"Validate GitLab CI config" requires project for local file import. According to GitLab's online validator and documen tation this is incorrect

Steps to reproduce

Create two file config in single repo. Open .gitlab-ci.yml and run "GitLab: Validate GitLab CI config"

//.gitlab-ci.yml

stages:
    - echo

include:
    - local: child.gitlab-ci.yml

// child.gitlab-ci.yml

stages:
    - echo

echo:
    stage: echo
    image: ruby:2.6
    script:
        - echo "echo"

What is the current bug behavior?

Validation fails with error "Local file child.gitlab-ci.yml does not have project!"

What is the expected correct behavior?

Should say "Your CI configuration is valid."

Relevant logs and/or screenshots

(Logs can be found by running Developer: Show Logs ... command (using cmd+shift+p) and selecting Extension Host)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by hixus