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.

63 lines
1.8 KiB

  1. ---
  2. yamllint:
  3. extends: .job
  4. stage: unit-tests
  5. variables:
  6. LANG: C.UTF-8
  7. script:
  8. - yamllint --strict .
  9. except: ['triggers', 'master']
  10. vagrant-validate:
  11. extends: .job
  12. stage: unit-tests
  13. script:
  14. - curl -sL https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.deb -o /tmp/vagrant_2.2.4_x86_64.deb
  15. - dpkg -i /tmp/vagrant_2.2.4_x86_64.deb
  16. - vagrant validate --ignore-provider
  17. except: ['triggers', 'master']
  18. ansible-lint:
  19. extends: .job
  20. stage: unit-tests
  21. # lint every yml/yaml file that looks like it contains Ansible plays
  22. script: |-
  23. grep -Rl '^- hosts: \|^ hosts: ' --include \*.yml --include \*.yaml . | xargs -P 4 -n 25 ansible-lint -v
  24. except: ['triggers', 'master']
  25. syntax-check:
  26. extends: .job
  27. stage: unit-tests
  28. variables:
  29. ANSIBLE_INVENTORY: inventory/local-tests.cfg
  30. ANSIBLE_REMOTE_USER: root
  31. ANSIBLE_BECOME: "true"
  32. ANSIBLE_BECOME_USER: root
  33. ANSIBLE_VERBOSITY: "3"
  34. script:
  35. - ansible-playbook --syntax-check cluster.yml
  36. - ansible-playbook --syntax-check upgrade-cluster.yml
  37. - ansible-playbook --syntax-check reset.yml
  38. - ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
  39. except: ['triggers', 'master']
  40. tox-inventory-builder:
  41. stage: unit-tests
  42. extends: .job
  43. before_script:
  44. - ./tests/scripts/rebase.sh
  45. - apt-get update && apt-get install -y python3-pip
  46. - update-alternatives --install /usr/bin/python python /usr/bin/python3 10
  47. - python -m pip install -r tests/requirements.txt
  48. script:
  49. - pip3 install tox
  50. - cd contrib/inventory_builder && tox
  51. except: ['triggers', 'master']
  52. markdownlint:
  53. stage: unit-tests
  54. image: node
  55. before_script:
  56. - npm install -g markdownlint-cli
  57. script:
  58. - markdownlint README.md docs --ignore docs/_sidebar.md