2021-09-02 23:17:54 +07:00
|
|
|
---
|
2016-09-23 22:54:35 +07:00
|
|
|
|
2021-09-02 23:17:54 +07:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- VAGRANT_VERSION='2.2.18'
|
|
|
|
jobs:
|
|
|
|
- PLATFORM='docker-buster-default-master' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
- PLATFORM='docker-buster-upstream-master' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
- PLATFORM='docker-buster-default-galera-1' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
- PLATFORM='docker-buster-upstream-galera-1' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
- PLATFORM='docker-bullseye-default-master' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
- PLATFORM='docker-bullseye-upstream-master' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
- PLATFORM='docker-bullseye-default-galera-1' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
- PLATFORM='docker-bullseye-upstream-galera-1' ANSIBLE_VERSION='>=2.11,<2.12'
|
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
dist: focal
|
2016-09-25 18:28:30 +07:00
|
|
|
|
2017-06-28 21:15:44 +07:00
|
|
|
language: python
|
2021-09-02 23:17:54 +07:00
|
|
|
python:
|
|
|
|
- 3.8
|
2017-06-28 21:15:44 +07:00
|
|
|
|
2016-09-25 18:28:30 +07:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2017-06-28 21:15:44 +07:00
|
|
|
before_install:
|
2021-09-02 23:17:54 +07:00
|
|
|
- sudo apt-get -q update
|
|
|
|
- sudo apt-get install -y yamllint
|
|
|
|
- sudo wget -nv https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.deb
|
|
|
|
- sudo dpkg -i vagrant_${VAGRANT_VERSION}_x86_64.deb
|
2019-08-07 22:41:45 +07:00
|
|
|
- vagrant plugin install vagrant-hostmanager
|
2017-06-28 21:15:44 +07:00
|
|
|
|
|
|
|
install:
|
2021-09-02 23:17:54 +07:00
|
|
|
- sudo pip install "ansible-core$ANSIBLE_VERSION"
|
|
|
|
- sudo pip install ansible-lint
|
|
|
|
- ansible-galaxy collection install community.general community.mysql community.crypto ansible.posix
|
2016-09-23 22:54:35 +07:00
|
|
|
|
|
|
|
script:
|
2017-06-28 21:15:44 +07:00
|
|
|
- VAGRANT_DEFAULT_PROVIDER=docker vagrant up $PLATFORM
|
|
|
|
- >
|
|
|
|
VAGRANT_DEFAULT_PROVIDER=docker vagrant provision $PLATFORM
|
|
|
|
| grep -q 'changed=0.*failed=0'
|
|
|
|
&& (echo 'Idempotence test: pass' && exit 0)
|
|
|
|
|| (echo 'Idempotence test: fail' && exit 1)
|
|
|
|
- VAGRANT_DEFAULT_PROVIDER=docker vagrant status
|
2021-09-02 23:17:54 +07:00
|
|
|
- >
|
|
|
|
yamllint .
|
|
|
|
&& (echo 'YAML lint test: pass' && exit 0)
|
|
|
|
|| (echo 'YAML lint test: fail' && exit 1)
|
|
|
|
- >
|
|
|
|
ansible-lint -v tests/test.yml
|
|
|
|
&& (echo 'Ansible lint test: pass' && exit 0)
|
|
|
|
|| (echo 'Ansible lint test: fail' && exit 1)
|
2016-09-23 22:54:35 +07:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|