-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from mrlesmithjr/integrate-new-travis-ci-testing
Integrate new travis ci testing
Showing
16 changed files
with
219 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
language: python | ||
python: "2.7" | ||
|
||
# Use the new container infrastructure | ||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
env: | ||
- distribution: centos | ||
init: /usr/lib/systemd/systemd | ||
version: 7 | ||
# - 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 docker pull ${distribution}:${version}' | ||
- 'sudo docker build --no-cache --rm --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests' | ||
|
||
script: | ||
- container_id=$(mktemp) | ||
- role_name="ansible-netdata" | ||
- '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-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})"' | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ galaxy_info: | |
- name: Debian | ||
versions: | ||
- jessie | ||
- stretch | ||
- name: Ubuntu | ||
versions: | ||
- precise | ||
|
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
TAR_FILE="v1.3.tar.gz" | ||
|
||
# Prompt for Ansible role name | ||
read -p "Enter the Ansible role name: " input | ||
|
||
# Update .travis.yml with Ansible role name | ||
sed -i '' "s/replace_role/${input}/g" ".travis.yml" | ||
|
||
# Update tests/test.yml with Ansible role name | ||
sed -i '' "s/replace_role/${input}/g" "tests/test.yml" | ||
|
||
# Cleanup | ||
if [ -f $TAR_FILE ]; then | ||
rm $TAR_FILE | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM centos:7 | ||
ENV container=docker | ||
|
||
RUN yum -y install epel-release && \ | ||
yum -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
python-devel python-pip python-setuptools python-virtualenv \ | ||
redhat-rpm-config && \ | ||
yum -y group install "Development Tools" | ||
|
||
# Install systemd -- See https://hub.docker.com/_/centos/ | ||
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
rm -f /etc/systemd/system/*.wants/*;\ | ||
rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
|
||
RUN pip install ansible | ||
|
||
VOLUME ["/sys/fs/cgroup"] | ||
|
||
CMD ["/usr/sbin/init"] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM debian:jessie | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
python-virtualenv | ||
|
||
RUN pip install --upgrade setuptools wheel && pip install ansible |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM debian:stretch | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
python-virtualenv systemd | ||
|
||
RUN pip install --upgrade setuptools wheel && pip install ansible |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM fedora:24 | ||
ENV container=docker | ||
|
||
RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
redhat-rpm-config systemd && \ | ||
dnf -y group install "C Development Tools and Libraries" | ||
|
||
# Install systemd -- See https://hub.docker.com/_/centos/ | ||
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
rm -f /etc/systemd/system/*.wants/*;\ | ||
rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
|
||
RUN pip install ansible | ||
|
||
VOLUME ["/sys/fs/cgroup"] | ||
|
||
CMD ["/usr/sbin/init"] |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM fedora:25 | ||
ENV container=docker | ||
|
||
RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
redhat-rpm-config systemd && \ | ||
dnf -y group install "C Development Tools and Libraries" | ||
|
||
# Install systemd -- See https://hub.docker.com/_/centos/ | ||
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
rm -f /etc/systemd/system/*.wants/*;\ | ||
rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
|
||
RUN pip install ansible | ||
|
||
VOLUME ["/sys/fs/cgroup"] | ||
|
||
CMD ["/usr/sbin/init"] |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM fedora:26 | ||
ENV container=docker | ||
|
||
RUN dnf -y install gmp-devel libffi-devel openssl-devel python-crypto \ | ||
python-devel python-dnf python-pip python-setuptools python-virtualenv \ | ||
redhat-rpm-config systemd && \ | ||
dnf -y group install "C Development Tools and Libraries" | ||
|
||
# Install systemd -- See https://hub.docker.com/_/centos/ | ||
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | ||
rm -f /lib/systemd/system/multi-user.target.wants/*;\ | ||
rm -f /etc/systemd/system/*.wants/*;\ | ||
rm -f /lib/systemd/system/local-fs.target.wants/*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | ||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | ||
rm -f /lib/systemd/system/basic.target.wants/*;\ | ||
rm -f /lib/systemd/system/anaconda.target.wants/*; | ||
|
||
RUN pip install ansible | ||
|
||
VOLUME ["/sys/fs/cgroup"] | ||
|
||
CMD ["/usr/sbin/init"] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ubuntu:bionic | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
python-virtualenv systemd | ||
|
||
RUN pip install ansible |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ubuntu:trusty | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
python-virtualenv | ||
|
||
RUN pip install --upgrade pip setuptools && pip install ansible |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ubuntu:xenial | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev \ | ||
libssl-dev python-dev python-minimal python-pip python-setuptools \ | ||
python-virtualenv | ||
|
||
RUN pip install ansible |
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,2 +1 @@ | ||
localhost | ||
|
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,5 +1,5 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
- hosts: localhost | ||
connection: local | ||
roles: | ||
- ansible-netdata | ||
- ansible-netdata |