2019-04-17 15:32:03 +00:00
|
|
|
---
|
2019-04-16 12:35:05 +00:00
|
|
|
yamllint:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
|
|
|
script:
|
2019-04-20 13:15:41 +00:00
|
|
|
- yamllint --strict .
|
2019-04-16 12:35:05 +00:00
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
|
|
|
ansible-lint:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
|
|
|
# lint every yml/yaml file that looks like it contains Ansible plays
|
|
|
|
script: |-
|
|
|
|
grep -Rl '^- hosts: \|^ hosts: \|^- name: ' --include \*.yml --include \*.yaml . | xargs ansible-lint -v
|
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
|
|
|
syntax-check:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
|
|
|
script:
|
|
|
|
- ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
|
|
|
|
- ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
|
|
|
|
- ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
|
|
|
|
- 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
|
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
|
|
|
tox-inventory-builder:
|
|
|
|
stage: unit-tests
|
|
|
|
extends: .job
|
|
|
|
script:
|
|
|
|
- pip install tox
|
|
|
|
- cd contrib/inventory_builder && tox
|
|
|
|
when: manual
|
|
|
|
except: ['triggers', 'master']
|