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.

40 lines
1.1 KiB

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