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.

80 lines
2.2 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/jumanjihouse/pre-commit-hooks
  28. rev: 3.0.0
  29. hooks:
  30. - id: shellcheck
  31. args: [ --severity, "error" ]
  32. exclude: "^.git"
  33. files: "\\.sh$"
  34. - repo: local
  35. hooks:
  36. - id: ansible-lint
  37. name: ansible-lint
  38. entry: ansible-lint -v
  39. language: python
  40. pass_filenames: false
  41. additional_dependencies:
  42. - .[community]
  43. - id: ansible-syntax-check
  44. name: ansible-syntax-check
  45. 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
  46. language: python
  47. files: "^cluster.yml|^upgrade-cluster.yml|^reset.yml|^extra_playbooks/upgrade-only-k8s.yml"
  48. - id: tox-inventory-builder
  49. name: tox-inventory-builder
  50. entry: bash -c "cd contrib/inventory_builder && tox"
  51. language: python
  52. pass_filenames: false
  53. - id: check-readme-versions
  54. name: check-readme-versions
  55. entry: tests/scripts/check_readme_versions.sh
  56. language: script
  57. pass_filenames: false
  58. - id: ci-matrix
  59. name: ci-matrix
  60. entry: tests/scripts/md-table/test.sh
  61. language: script
  62. pass_filenames: false
  63. - id: jinja-syntax-check
  64. name: jinja-syntax-check
  65. entry: tests/scripts/check-templates.py
  66. language: python
  67. types:
  68. - jinja
  69. additional_dependencies:
  70. - Jinja2