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
Release files for gitlabci-jsonschema-lint 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gitlabci-jsonschema-lint-0.0.3.tar.gz | 12.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitlabci_jsonschema_lint-0.0.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size:26.6 kB
Release files / gitlabci-jsonschema-lint-0.0.3.tar.gz
| Download URL | gitlabci-jsonschema-lint-0.0.3.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec5ef51ce0b691de26b6e15fb716042cb5b3fbd53cf2d9d5f0cc6e6d7955957e
|
|
BLAKE2b-256 checksum How to use checksums |
598274004fe835bdebd88786db596e9e6a060e136c0aae81a77ca4450dcd1814
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / gitlabci_jsonschema_lint-0.0.3-py2.py3-none-any.whl
| Download URL | gitlabci_jsonschema_lint-0.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0d938b1d5aa2f7b2a110b4c662a1552f1c9a951f58a3bf730fe10b400b633339
|
|
BLAKE2b-256 checksum How to use checksums |
716c35db0338e07c49e9399564dd4635bf111d9d183e6a19fd674bdf0d8b9791
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|