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.

118 lines
3.0 KiB

  1. ---
  2. yamllint:
  3. extends: .job
  4. stage: unit-tests
  5. tags: [light]
  6. variables:
  7. LANG: C.UTF-8
  8. script:
  9. - yamllint --strict .
  10. except: ['triggers', 'master']
  11. vagrant-validate:
  12. extends: .job
  13. stage: unit-tests
  14. tags: [light]
  15. variables:
  16. VAGRANT_VERSION: 2.3.7
  17. script:
  18. - ./tests/scripts/vagrant-validate.sh
  19. except: ['triggers', 'master']
  20. ansible-lint:
  21. extends: .job
  22. stage: unit-tests
  23. tags: [light]
  24. script:
  25. - ansible-lint -v
  26. except: ['triggers', 'master']
  27. jinja-syntax-check:
  28. extends: .job
  29. stage: unit-tests
  30. tags: [light]
  31. script:
  32. - "find -name '*.j2' -exec tests/scripts/check-templates.py {} +"
  33. except: ['triggers', 'master']
  34. syntax-check:
  35. extends: .job
  36. stage: unit-tests
  37. tags: [light]
  38. variables:
  39. ANSIBLE_INVENTORY: inventory/local-tests.cfg
  40. ANSIBLE_REMOTE_USER: root
  41. ANSIBLE_BECOME: "true"
  42. ANSIBLE_BECOME_USER: root
  43. ANSIBLE_VERBOSITY: "3"
  44. script:
  45. - ansible-playbook --syntax-check cluster.yml
  46. - ansible-playbook --syntax-check playbooks/cluster.yml
  47. - ansible-playbook --syntax-check upgrade-cluster.yml
  48. - ansible-playbook --syntax-check playbooks/upgrade_cluster.yml
  49. - ansible-playbook --syntax-check reset.yml
  50. - ansible-playbook --syntax-check playbooks/reset.yml
  51. - ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
  52. except: ['triggers', 'master']
  53. collection-build-install-sanity-check:
  54. extends: .job
  55. stage: unit-tests
  56. tags: [light]
  57. variables:
  58. ANSIBLE_COLLECTIONS_PATH: "./ansible_collections"
  59. script:
  60. - ansible-galaxy collection build
  61. - ansible-galaxy collection install kubernetes_sigs-kubespray-$(grep "^version:" galaxy.yml | awk '{print $2}').tar.gz
  62. - ansible-galaxy collection list $(egrep -i '(name:\s+|namespace:\s+)' galaxy.yml | awk '{print $2}' | tr '\n' '.' | sed 's|\.$||g') | grep "^kubernetes_sigs.kubespray"
  63. - test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/cluster.yml
  64. - test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/reset.yml
  65. except: ['triggers', 'master']
  66. tox-inventory-builder:
  67. stage: unit-tests
  68. tags: [light]
  69. extends: .job
  70. before_script:
  71. - ./tests/scripts/rebase.sh
  72. script:
  73. - pip3 install tox
  74. - cd contrib/inventory_builder && tox
  75. except: ['triggers', 'master']
  76. markdownlint:
  77. stage: unit-tests
  78. tags: [light]
  79. image: node
  80. before_script:
  81. - npm install -g markdownlint-cli@0.22.0
  82. script:
  83. - markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
  84. check-readme-versions:
  85. stage: unit-tests
  86. tags: [light]
  87. image: python:3
  88. script:
  89. - tests/scripts/check_readme_versions.sh
  90. check-galaxy-version:
  91. stage: unit-tests
  92. tags: [light]
  93. image: python:3
  94. script:
  95. - tests/scripts/check_galaxy_version.sh
  96. check-typo:
  97. stage: unit-tests
  98. tags: [light]
  99. image: python:3
  100. script:
  101. - tests/scripts/check_typo.sh
  102. ci-matrix:
  103. stage: unit-tests
  104. tags: [light]
  105. image: python:3
  106. script:
  107. - tests/scripts/md-table/test.sh