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.

33 lines
1.2 KiB

  1. yamllint:
  2. extends: .job
  3. stage: unit-tests
  4. script:
  5. - yamllint .
  6. except: ['triggers', 'master']
  7. ansible-lint:
  8. extends: .job
  9. stage: unit-tests
  10. # lint every yml/yaml file that looks like it contains Ansible plays
  11. script: |-
  12. grep -Rl '^- hosts: \|^ hosts: \|^- name: ' --include \*.yml --include \*.yaml . | xargs ansible-lint -v
  13. except: ['triggers', 'master']
  14. syntax-check:
  15. extends: .job
  16. stage: unit-tests
  17. script:
  18. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  19. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  20. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  21. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root extra_playbooks/upgrade-only-k8s.yml -vvv --syntax-check
  22. except: ['triggers', 'master']
  23. tox-inventory-builder:
  24. stage: unit-tests
  25. extends: .job
  26. script:
  27. - pip install tox
  28. - cd contrib/inventory_builder && tox
  29. when: manual
  30. except: ['triggers', 'master']