You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.1 KiB

  1. ---
  2. repos:
  3. - repo: https://github.com/pre-commit/pre-commit-hooks
  4. rev: v4.6.0
  5. hooks:
  6. - id: check-added-large-files
  7. - id: check-case-conflict
  8. - id: check-executables-have-shebangs
  9. - id: check-xml
  10. - id: check-merge-conflict
  11. - id: detect-private-key
  12. - id: end-of-file-fixer
  13. - id: forbid-new-submodules
  14. - id: requirements-txt-fixer
  15. - id: trailing-whitespace
  16. - repo: https://github.com/adrienverge/yamllint.git
  17. rev: v1.35.1
  18. hooks:
  19. - id: yamllint
  20. args: [--strict]
  21. - repo: https://github.com/markdownlint/markdownlint
  22. rev: v0.12.0
  23. hooks:
  24. - id: markdownlint
  25. exclude: "^.github|(^docs/_sidebar\\.md$)"
  26. - repo: https://github.com/shellcheck-py/shellcheck-py
  27. rev: v0.10.0.1
  28. hooks:
  29. - id: shellcheck
  30. args: ["--severity=error"]
  31. exclude: "^.git"
  32. files: "\\.sh$"
  33. - repo: https://github.com/ansible/ansible-lint
  34. rev: v24.5.0
  35. hooks:
  36. - id: ansible-lint
  37. additional_dependencies:
  38. - ansible==9.8.0
  39. - jsonschema==4.22.0
  40. - jmespath==1.0.1
  41. - netaddr==1.3.0
  42. - distlib
  43. - repo: https://github.com/golangci/misspell
  44. rev: v0.6.0
  45. hooks:
  46. - id: misspell
  47. exclude: "OWNERS_ALIASES$"
  48. - repo: local
  49. hooks:
  50. - id: ansible-syntax-check
  51. name: ansible-syntax-check
  52. 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
  53. language: python
  54. files: "^cluster.yml|^upgrade-cluster.yml|^reset.yml|^extra_playbooks/upgrade-only-k8s.yml"
  55. additional_dependencies:
  56. - ansible==9.5.1
  57. - id: tox-inventory-builder
  58. name: tox-inventory-builder
  59. entry: bash -c "cd contrib/inventory_builder && tox"
  60. language: python
  61. pass_filenames: false
  62. additional_dependencies:
  63. - tox==4.15.0
  64. - id: check-readme-versions
  65. name: check-readme-versions
  66. entry: tests/scripts/check_readme_versions.sh
  67. language: script
  68. pass_filenames: false
  69. - id: collection-build-install
  70. name: Build and install kubernetes-sigs.kubespray Ansible collection
  71. language: python
  72. additional_dependencies:
  73. - ansible-core>=2.16.4
  74. - distlib
  75. entry: tests/scripts/collection-build-install.sh
  76. pass_filenames: false
  77. - id: generate-docs-sidebar
  78. name: generate-docs-sidebar
  79. entry: scripts/gen_docs_sidebar.sh
  80. language: script
  81. pass_filenames: false
  82. - id: ci-matrix
  83. name: ci-matrix
  84. entry: tests/scripts/md-table/main.py
  85. language: python
  86. pass_filenames: false
  87. additional_dependencies:
  88. - jinja2
  89. - pathlib
  90. - pyaml
  91. - id: jinja-syntax-check
  92. name: jinja-syntax-check
  93. entry: tests/scripts/check-templates.py
  94. language: python
  95. types:
  96. - jinja
  97. additional_dependencies:
  98. - jinja2