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
2.8 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.4
  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. syntax-check:
  28. extends: .job
  29. stage: unit-tests
  30. tags: [light]
  31. variables:
  32. ANSIBLE_INVENTORY: inventory/local-tests.cfg
  33. ANSIBLE_REMOTE_USER: root
  34. ANSIBLE_BECOME: "true"
  35. ANSIBLE_BECOME_USER: root
  36. ANSIBLE_VERBOSITY: "3"
  37. script:
  38. - ansible-playbook --syntax-check cluster.yml
  39. - ansible-playbook --syntax-check playbooks/cluster.yml
  40. - ansible-playbook --syntax-check upgrade-cluster.yml
  41. - ansible-playbook --syntax-check playbooks/upgrade_cluster.yml
  42. - ansible-playbook --syntax-check reset.yml
  43. - ansible-playbook --syntax-check playbooks/reset.yml
  44. - ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
  45. except: ['triggers', 'master']
  46. collection-build-install-sanity-check:
  47. extends: .job
  48. stage: unit-tests
  49. tags: [light]
  50. variables:
  51. ANSIBLE_COLLECTIONS_PATH: "./ansible_collections"
  52. script:
  53. - ansible-galaxy collection build
  54. - ansible-galaxy collection install kubernetes_sigs-kubespray-$(grep "^version:" galaxy.yml | awk '{print $2}').tar.gz
  55. - ansible-galaxy collection list $(egrep -i '(name:\s+|namespace:\s+)' galaxy.yml | awk '{print $2}' | tr '\n' '.' | sed 's|\.$||g') | grep "^kubernetes_sigs.kubespray"
  56. - test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/cluster.yml
  57. - test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/reset.yml
  58. except: ['triggers', 'master']
  59. tox-inventory-builder:
  60. stage: unit-tests
  61. tags: [light]
  62. extends: .job
  63. before_script:
  64. - ./tests/scripts/rebase.sh
  65. script:
  66. - pip3 install tox
  67. - cd contrib/inventory_builder && tox
  68. except: ['triggers', 'master']
  69. markdownlint:
  70. stage: unit-tests
  71. tags: [light]
  72. image: node
  73. before_script:
  74. - npm install -g markdownlint-cli@0.22.0
  75. script:
  76. - markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
  77. check-readme-versions:
  78. stage: unit-tests
  79. tags: [light]
  80. image: python:3
  81. script:
  82. - tests/scripts/check_readme_versions.sh
  83. check-galaxy-version:
  84. stage: unit-tests
  85. tags: [light]
  86. image: python:3
  87. script:
  88. - tests/scripts/check_galaxy_version.sh
  89. check-typo:
  90. stage: unit-tests
  91. tags: [light]
  92. image: python:3
  93. script:
  94. - tests/scripts/check_typo.sh
  95. ci-matrix:
  96. stage: unit-tests
  97. tags: [light]
  98. image: python:3
  99. script:
  100. - tests/scripts/md-table/test.sh