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: v3.4.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.27.1
  18. hooks:
  19. - id: yamllint
  20. args: [--strict]
  21. - repo: https://github.com/markdownlint/markdownlint
  22. rev: v0.11.0
  23. hooks:
  24. - id: markdownlint
  25. args: [-r, "~MD013,~MD029"]
  26. exclude: "^.git"
  27. - repo: https://github.com/shellcheck-py/shellcheck-py
  28. rev: v0.10.0.1
  29. hooks:
  30. - id: shellcheck
  31. args: ["--severity=error"]
  32. exclude: "^.git"
  33. files: "\\.sh$"
  34. - repo: https://github.com/ansible/ansible-lint
  35. rev: v24.5.0
  36. hooks:
  37. - id: ansible-lint
  38. additional_dependencies:
  39. - ansible==9.5.1
  40. - jsonschema==4.22.0
  41. - jmespath==1.0.1
  42. - netaddr==1.2.1
  43. - repo: https://github.com/VannTen/misspell
  44. # Waiting on https://github.com/golangci/misspell/pull/19 to get merged
  45. rev: 8592a4e
  46. hooks:
  47. - id: misspell
  48. exclude: "OWNERS_ALIASES$"
  49. - repo: local
  50. hooks:
  51. - id: ansible-syntax-check
  52. name: ansible-syntax-check
  53. 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
  54. language: python
  55. files: "^cluster.yml|^upgrade-cluster.yml|^reset.yml|^extra_playbooks/upgrade-only-k8s.yml"
  56. additional_dependencies:
  57. - ansible==9.5.1
  58. - id: tox-inventory-builder
  59. name: tox-inventory-builder
  60. entry: bash -c "cd contrib/inventory_builder && tox"
  61. language: python
  62. pass_filenames: false
  63. additional_dependencies:
  64. - tox==4.15.0
  65. - id: check-readme-versions
  66. name: check-readme-versions
  67. entry: tests/scripts/check_readme_versions.sh
  68. language: script
  69. pass_filenames: false
  70. - id: collection-build-install
  71. name: Build and install kubernetes-sigs.kubespray Ansible collection
  72. language: python
  73. additional_dependencies:
  74. - ansible-core>=2.16.4
  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