2022-08-24 21:54:03 +08:00
|
|
|
---
|
|
|
|
repos:
|
2023-02-06 17:35:16 +08:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-05-28 17:27:06 +08:00
|
|
|
rev: v4.6.0
|
2023-02-06 17:35:16 +08:00
|
|
|
hooks:
|
|
|
|
- id: check-added-large-files
|
|
|
|
- id: check-case-conflict
|
|
|
|
- id: check-executables-have-shebangs
|
|
|
|
- id: check-xml
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: detect-private-key
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: forbid-new-submodules
|
|
|
|
- id: requirements-txt-fixer
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
2022-08-24 21:54:03 +08:00
|
|
|
- repo: https://github.com/adrienverge/yamllint.git
|
2024-05-28 17:27:06 +08:00
|
|
|
rev: v1.35.1
|
2022-08-24 21:54:03 +08:00
|
|
|
hooks:
|
|
|
|
- id: yamllint
|
|
|
|
args: [--strict]
|
|
|
|
|
|
|
|
- repo: https://github.com/markdownlint/markdownlint
|
2024-05-28 17:27:06 +08:00
|
|
|
rev: v0.12.0
|
2022-08-24 21:54:03 +08:00
|
|
|
hooks:
|
|
|
|
- id: markdownlint
|
2024-05-28 16:08:30 +08:00
|
|
|
exclude: "^.github|(^docs/_sidebar\\.md$)"
|
2022-08-24 21:54:03 +08:00
|
|
|
|
2024-05-21 22:00:49 +08:00
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
|
|
rev: v0.10.0.1
|
2023-02-07 11:08:57 +08:00
|
|
|
hooks:
|
|
|
|
- id: shellcheck
|
2024-05-21 22:00:49 +08:00
|
|
|
args: ["--severity=error"]
|
2023-02-07 11:08:57 +08:00
|
|
|
exclude: "^.git"
|
|
|
|
files: "\\.sh$"
|
|
|
|
|
2024-05-22 02:57:06 +08:00
|
|
|
- repo: https://github.com/ansible/ansible-lint
|
|
|
|
rev: v24.5.0
|
2022-08-24 21:54:03 +08:00
|
|
|
hooks:
|
|
|
|
- id: ansible-lint
|
|
|
|
additional_dependencies:
|
2024-08-02 18:43:54 +08:00
|
|
|
- ansible==9.8.0
|
2024-05-22 02:57:06 +08:00
|
|
|
- jsonschema==4.22.0
|
|
|
|
- jmespath==1.0.1
|
2024-08-02 18:43:54 +08:00
|
|
|
- netaddr==1.3.0
|
2024-05-28 19:18:26 +08:00
|
|
|
- distlib
|
2022-08-24 21:54:03 +08:00
|
|
|
|
2024-06-26 20:14:21 +08:00
|
|
|
- repo: https://github.com/golangci/misspell
|
|
|
|
rev: v0.6.0
|
2024-05-22 16:31:18 +08:00
|
|
|
hooks:
|
|
|
|
- id: misspell
|
|
|
|
exclude: "OWNERS_ALIASES$"
|
|
|
|
|
2024-05-22 02:57:06 +08:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
2022-08-24 21:54:03 +08:00
|
|
|
- id: ansible-syntax-check
|
|
|
|
name: ansible-syntax-check
|
|
|
|
entry: env ANSIBLE_INVENTORY=inventory/local-tests.cfg ANSIBLE_REMOTE_USER=root ANSIBLE_BECOME="true" ANSIBLE_BECOME_USER=root ANSIBLE_VERBOSITY="3" ansible-playbook --syntax-check
|
|
|
|
language: python
|
|
|
|
files: "^cluster.yml|^upgrade-cluster.yml|^reset.yml|^extra_playbooks/upgrade-only-k8s.yml"
|
2024-05-22 02:59:51 +08:00
|
|
|
additional_dependencies:
|
|
|
|
- ansible==9.5.1
|
2022-08-24 21:54:03 +08:00
|
|
|
|
|
|
|
- id: tox-inventory-builder
|
|
|
|
name: tox-inventory-builder
|
|
|
|
entry: bash -c "cd contrib/inventory_builder && tox"
|
|
|
|
language: python
|
|
|
|
pass_filenames: false
|
2024-05-22 02:59:51 +08:00
|
|
|
additional_dependencies:
|
|
|
|
- tox==4.15.0
|
2022-08-24 21:54:03 +08:00
|
|
|
|
|
|
|
- id: check-readme-versions
|
|
|
|
name: check-readme-versions
|
|
|
|
entry: tests/scripts/check_readme_versions.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: false
|
|
|
|
|
2024-05-22 19:40:41 +08:00
|
|
|
- id: collection-build-install
|
|
|
|
name: Build and install kubernetes-sigs.kubespray Ansible collection
|
|
|
|
language: python
|
|
|
|
additional_dependencies:
|
|
|
|
- ansible-core>=2.16.4
|
2024-05-28 19:18:26 +08:00
|
|
|
- distlib
|
2024-05-22 19:40:41 +08:00
|
|
|
entry: tests/scripts/collection-build-install.sh
|
|
|
|
pass_filenames: false
|
|
|
|
|
2024-05-16 23:49:24 +08:00
|
|
|
- id: generate-docs-sidebar
|
|
|
|
name: generate-docs-sidebar
|
|
|
|
entry: scripts/gen_docs_sidebar.sh
|
|
|
|
language: script
|
|
|
|
pass_filenames: false
|
|
|
|
|
2022-08-24 21:54:03 +08:00
|
|
|
- id: ci-matrix
|
|
|
|
name: ci-matrix
|
2024-05-22 03:31:32 +08:00
|
|
|
entry: tests/scripts/md-table/main.py
|
|
|
|
language: python
|
2022-08-24 21:54:03 +08:00
|
|
|
pass_filenames: false
|
2024-05-22 03:31:32 +08:00
|
|
|
additional_dependencies:
|
|
|
|
- jinja2
|
|
|
|
- pathlib
|
|
|
|
- pyaml
|
2023-12-06 10:05:24 +08:00
|
|
|
|
|
|
|
- id: jinja-syntax-check
|
|
|
|
name: jinja-syntax-check
|
|
|
|
entry: tests/scripts/check-templates.py
|
|
|
|
language: python
|
|
|
|
types:
|
|
|
|
- jinja
|
|
|
|
additional_dependencies:
|
2024-05-22 02:59:51 +08:00
|
|
|
- jinja2
|