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.

76 lines
1.9 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.10
  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 install -r tests/requirements.txt
  53. script:
  54. - pip3 install tox
  55. - cd contrib/inventory_builder && tox
  56. except: ['triggers', 'master']
  57. markdownlint:
  58. stage: unit-tests
  59. tags: [light]
  60. image: node
  61. before_script:
  62. - npm install -g markdownlint-cli@0.22.0
  63. script:
  64. - markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
  65. ci-matrix:
  66. stage: unit-tests
  67. tags: [light]
  68. image: python:3
  69. script:
  70. - tests/scripts/md-table/test.sh