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.

34 lines
1.2 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. script:
  19. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  20. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  21. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  22. - 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
  23. except: ['triggers', 'master']
  24. tox-inventory-builder:
  25. stage: unit-tests
  26. extends: .job
  27. script:
  28. - pip install tox
  29. - cd contrib/inventory_builder && tox
  30. when: manual
  31. except: ['triggers', 'master']