Python library to lint .gitlab-ci.yml files
Project description
gitlabci-jsonschema-lint
This is a pre-commit hook that uses the json schema
from https://json.schemastore.org/gitlab-ci
to validate the contents of your .gitlab-ci.yml
file.
Rationale
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
:
repos:
- repo: https://github.com/bagerard/gitlabci-jsonschema-lint
rev: master
hooks:
- id: gitlabci-jsonschema-lint
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gitlabci-jsonschema-lint-0.0.3.tar.gz
.
File metadata
- Download URL: gitlabci-jsonschema-lint-0.0.3.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec5ef51ce0b691de26b6e15fb716042cb5b3fbd53cf2d9d5f0cc6e6d7955957e |
|
MD5 | 1ebee3b133254fb5f8e55da7db26038a |
|
BLAKE2b-256 | 598274004fe835bdebd88786db596e9e6a060e136c0aae81a77ca4450dcd1814 |
File details
Details for the file gitlabci_jsonschema_lint-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: gitlabci_jsonschema_lint-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d938b1d5aa2f7b2a110b4c662a1552f1c9a951f58a3bf730fe10b400b633339 |
|
MD5 | db9cc1dded36fdebe6190663fa015a5d |
|
BLAKE2b-256 | 716c35db0338e07c49e9399564dd4635bf111d9d183e6a19fd674bdf0d8b9791 |