-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated files, etc. after new structure
- Loading branch information
1 parent
4aada31
commit 9316a6b
Showing
4 changed files
with
40 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,22 @@ | ||
--- | ||
language: python | ||
python: "2.7" | ||
|
||
# Use the new container infrastructure | ||
sudo: required | ||
|
||
language: python | ||
services: | ||
- docker | ||
|
||
env: | ||
- distribution: centos | ||
init: /usr/lib/systemd/systemd | ||
version: 7 | ||
# - distribution: fedora | ||
# init: /usr/lib/systemd/systemd | ||
# version: 29 | ||
# - distribution: fedora | ||
# init: /usr/lib/systemd/systemd | ||
# version: 28 | ||
# - distribution: fedora | ||
# init: /usr/lib/systemd/systemd | ||
# version: 27 | ||
# - distribution: fedora | ||
# init: /usr/lib/systemd/systemd | ||
# version: 26 | ||
# - distribution: fedora | ||
# init: /usr/lib/systemd/systemd | ||
# version: 25 | ||
# - distribution: fedora | ||
# init: /usr/lib/systemd/systemd | ||
# version: 24 | ||
- distribution: ubuntu | ||
init: /lib/systemd/systemd | ||
version: bionic | ||
- distribution: ubuntu | ||
init: /lib/systemd/systemd | ||
version: xenial | ||
# - distribution: ubuntu | ||
# init: /sbin/init | ||
# version: trusty | ||
# - distribution: debian | ||
# init: /lib/systemd/systemd | ||
# version: stretch | ||
# - distribution: debian | ||
# init: /lib/systemd/systemd | ||
# version: jessie | ||
|
||
before_install: | ||
- "sudo pip install yamllint" | ||
- yamllint -c .yamllint.yml . | ||
- "sudo docker pull ${distribution}:${version}" | ||
- "sudo docker build --no-cache --rm --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests" | ||
|
||
- sudo apt-get -qq update | ||
install: | ||
- pip3 install -r requirements.txt | ||
- ansible --version | ||
- molecule --version | ||
script: | ||
- container_id=$(mktemp) | ||
- role_name="ansible-kea-dhcp" | ||
- 'sudo docker run --detach --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume="${PWD}":/etc/ansible/roles/${role_name}:ro ${distribution}-${version}:ansible ${init} > "${container_id}"' | ||
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-lint -c /.ansible-lint /etc/ansible/roles/${role_name}/tests/test.yml' | ||
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml --syntax-check' | ||
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml' | ||
- > | ||
sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml | ||
| grep -q 'changed=0.*failed=0' | ||
&& (echo 'Idempotence test: pass' && exit 0) | ||
|| (echo 'Idempotence test: fail' && exit 1) | ||
- 'sudo docker rm -f "$(cat ${container_id})"' | ||
|
||
- molecule test --scenario-name centos7 | ||
# - molecule test --scenario-name centos8 | ||
# - molecule test --scenario-name debian8 | ||
- molecule test --scenario-name debian9 | ||
- molecule test --scenario-name debian10 | ||
- molecule test --scenario-name fedora | ||
- molecule test --scenario-name ubuntu1604 | ||
- molecule test --scenario-name ubuntu1804 | ||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters