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.

126 lines
3.1 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. generate-sidebar:
  85. extends: .job
  86. stage: unit-tests
  87. tags: [light]
  88. script:
  89. - scripts/gen_docs_sidebar.sh
  90. - git diff --exit-code
  91. check-readme-versions:
  92. stage: unit-tests
  93. tags: [light]
  94. image: python:3
  95. script:
  96. - tests/scripts/check_readme_versions.sh
  97. check-galaxy-version:
  98. stage: unit-tests
  99. tags: [light]
  100. image: python:3
  101. script:
  102. - tests/scripts/check_galaxy_version.sh
  103. check-typo:
  104. stage: unit-tests
  105. tags: [light]
  106. image: python:3
  107. script:
  108. - tests/scripts/check_typo.sh
  109. ci-matrix:
  110. stage: unit-tests
  111. tags: [light]
  112. image: python:3
  113. script:
  114. - tests/scripts/md-table/test.sh