Validate GitLab CI config................................................Failed
hook id: check-gitlab-ci
exit code: 1
Schema validation errors were encountered.
.gitlab-ci.yml::$.foo.artifacts.reports: Additional properties are not allowed ('annotations' was unexpected)
### Reference
Filed issue on gitlab site: https://gitlab.com/gitlab-org/gitlab/-/issues/465876
Issue:
Hook
check-gitlab-ci
is not able to handle.artifacts.reports.annotations
because it is missing the schemaExplanation
check-gitlab-ci
is using schema from https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json that is missing itSteps to reproduce:
check-gitlab-ci
in pre-commit config. Create.pre-commit-config.yaml
with a content below:repos:
git add .pre-commit-config.yaml git commit -a -m 'Add .pre-commit-config.yaml'
pre-commit install
foo: stage: build tags:
git add .gitlab-ci.yml git commit .gitlab-ci.yml -m 'Add .gitlab-ci.yml'
Validate GitLab CI config................................................Failed
Schema validation errors were encountered. .gitlab-ci.yml::$.foo.artifacts.reports: Additional properties are not allowed ('annotations' was unexpected)