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.

111 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.5.1
  39. - jsonschema==4.22.0
  40. - jmespath==1.0.1
  41. - netaddr==1.2.1
  42. - distlib
  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. - distlib
  76. entry: tests/scripts/collection-build-install.sh
  77. pass_filenames: false
  78. - id: generate-docs-sidebar
  79. name: generate-docs-sidebar
  80. entry: scripts/gen_docs_sidebar.sh
  81. language: script
  82. pass_filenames: false
  83. - id: ci-matrix
  84. name: ci-matrix
  85. entry: tests/scripts/md-table/main.py
  86. language: python
  87. pass_filenames: false
  88. additional_dependencies:
  89. - jinja2
  90. - pathlib
  91. - pyaml
  92. - id: jinja-syntax-check
  93. name: jinja-syntax-check
  94. entry: tests/scripts/check-templates.py
  95. language: python
  96. types:
  97. - jinja
  98. additional_dependencies:
  99. - jinja2