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.

77 lines
2.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.2.15
  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. # lint every yml/yaml file that looks like it contains Ansible plays
  25. script: |-
  26. grep -Rl '^- hosts: \|^ hosts: ' --include \*.yml --include \*.yaml . | xargs -P 4 -n 25 ansible-lint -v
  27. except: ['triggers', 'master']
  28. syntax-check:
  29. extends: .job
  30. stage: unit-tests
  31. tags: [light]
  32. variables:
  33. ANSIBLE_INVENTORY: inventory/local-tests.cfg
  34. ANSIBLE_REMOTE_USER: root
  35. ANSIBLE_BECOME: "true"
  36. ANSIBLE_BECOME_USER: root
  37. ANSIBLE_VERBOSITY: "3"
  38. script:
  39. - ansible-playbook --syntax-check cluster.yml
  40. - ansible-playbook --syntax-check upgrade-cluster.yml
  41. - ansible-playbook --syntax-check reset.yml
  42. - ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
  43. except: ['triggers', 'master']
  44. tox-inventory-builder:
  45. stage: unit-tests
  46. tags: [light]
  47. extends: .job
  48. before_script:
  49. - ./tests/scripts/rebase.sh
  50. - apt-get update && apt-get install -y python3-pip
  51. - update-alternatives --install /usr/bin/python python /usr/bin/python3 10
  52. - python -m pip uninstall -y ansible
  53. - python -m pip install -r tests/requirements.txt
  54. script:
  55. - pip3 install tox
  56. - cd contrib/inventory_builder && tox
  57. except: ['triggers', 'master']
  58. markdownlint:
  59. stage: unit-tests
  60. tags: [light]
  61. image: node
  62. before_script:
  63. - npm install -g markdownlint-cli@0.22.0
  64. script:
  65. - markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
  66. ci-matrix:
  67. stage: unit-tests
  68. tags: [light]
  69. image: python:3
  70. script:
  71. - tests/scripts/md-table/test.sh