Skip to main content

Python library to lint .gitlab-ci.yml files

Project description


This is a pre-commit hook that uses the json schema from to validate the contents of your .gitlab-ci.yml file.


Other similar tool exist like this hook but since the beginning of 2021, Gitlab updated their API and it is no longer possible to make unauthenticated calls to the Gitlab endpoint /api/v4/ci/lint that is used by the hook, and which makes it harder to integrate as it would require some shared token.

As an alternative to that, I created this hook which works completely offline

CLI Usage

gitlabci-jsonschema-lint ../some_projects/.gitlab-ci.yml

Pre-commit integration

An example .pre-commit-config.yaml:

  - repo:
    rev: master
      - id: gitlabci-jsonschema-lint

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitlabci-jsonschema-lint-0.0.3.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

gitlabci_jsonschema_lint-0.0.3-py2.py3-none-any.whl (14.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page