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.

49 lines
1.3 KiB

  1. ---
  2. yamllint:
  3. extends: .job
  4. stage: unit-tests
  5. script:
  6. - yamllint --strict .
  7. except: ['triggers', 'master']
  8. vagrant-validate:
  9. extends: .job
  10. stage: unit-tests
  11. script:
  12. - 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
  13. - dpkg -i /tmp/vagrant_2.2.4_x86_64.deb
  14. - vagrant validate --ignore-provider
  15. except: ['triggers', 'master']
  16. ansible-lint:
  17. extends: .job
  18. stage: unit-tests
  19. # lint every yml/yaml file that looks like it contains Ansible plays
  20. script: |-
  21. grep -Rl '^- hosts: \|^ hosts: ' --include \*.yml --include \*.yaml . | xargs -P 4 -n 25 ansible-lint -v
  22. except: ['triggers', 'master']
  23. syntax-check:
  24. extends: .job
  25. stage: unit-tests
  26. variables:
  27. ANSIBLE_INVENTORY: inventory/local-tests.cfg
  28. ANSIBLE_REMOTE_USER: root
  29. ANSIBLE_BECOME: "true"
  30. ANSIBLE_BECOME_USER: root
  31. ANSIBLE_VERBOSITY: "3"
  32. script:
  33. - ansible-playbook --syntax-check cluster.yml
  34. - ansible-playbook --syntax-check upgrade-cluster.yml
  35. - ansible-playbook --syntax-check reset.yml
  36. - ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
  37. except: ['triggers', 'master']
  38. tox-inventory-builder:
  39. stage: unit-tests
  40. extends: .job
  41. script:
  42. - pip install tox
  43. - cd contrib/inventory_builder && tox
  44. when: manual
  45. except: ['triggers', 'master']