diff options
author | Matt Clay <matt@mystile.com> | 2017-06-23 21:45:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 21:45:38 +0200 |
commit | 4530eea7f84446c85b4e04b7cf369c190a947c5d (patch) | |
tree | 591d029a52b207eb6ff313d70c76bf07ba7f9d76 | |
parent | [cloud] Fixes #26045 Ensure instance.instance_profile is not None before cast... (diff) | |
download | ansible-4530eea7f84446c85b4e04b7cf369c190a947c5d.tar.xz ansible-4530eea7f84446c85b4e04b7cf369c190a947c5d.zip |
Docker image updates for integration tests. (#26054)
* Sort packages to install.
* Add python-argparse to centos6 docker image.
* Add gcc and python dev lib to docker images.
* Add python cryptography to docker images.
* Add coverage using pip instead of OS packages.
* Update old pip versions in docker images.
* Exclude */pyshared/* from coverage reporting.
-rw-r--r-- | .coveragerc | 1 | ||||
-rw-r--r-- | test/utils/docker/centos6/Dockerfile | 4 | ||||
-rw-r--r-- | test/utils/docker/centos7/Dockerfile | 4 | ||||
-rw-r--r-- | test/utils/docker/fedora24/Dockerfile | 6 | ||||
-rw-r--r-- | test/utils/docker/fedora25/Dockerfile | 8 | ||||
-rw-r--r-- | test/utils/docker/opensuse42.1/Dockerfile | 3 | ||||
-rw-r--r-- | test/utils/docker/opensuse42.2/Dockerfile | 4 | ||||
-rw-r--r-- | test/utils/docker/ubuntu1204/Dockerfile | 5 | ||||
-rw-r--r-- | test/utils/docker/ubuntu1404/Dockerfile | 8 | ||||
-rw-r--r-- | test/utils/docker/ubuntu1604/Dockerfile | 6 | ||||
-rw-r--r-- | test/utils/docker/ubuntu1604py3/Dockerfile | 6 |
11 files changed, 33 insertions, 22 deletions
diff --git a/.coveragerc b/.coveragerc index f205885c9c..c8283bab61 100644 --- a/.coveragerc +++ b/.coveragerc @@ -21,4 +21,5 @@ omit = */python*/dist-packages/* */python*/site-packages/* */python*/distutils/* + */pyshared/* */pytest diff --git a/test/utils/docker/centos6/Dockerfile b/test/utils/docker/centos6/Dockerfile index 6b754ac589..5bfae387bb 100644 --- a/test/utils/docker/centos6/Dockerfile +++ b/test/utils/docker/centos6/Dockerfile @@ -19,7 +19,7 @@ RUN yum clean all && \ openssh-clients \ openssh-server \ openssl-devel \ - python-coverage \ + python-argparse \ python-devel \ python-httplib2 \ python-jinja2 \ @@ -56,6 +56,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done -RUN pip install junit-xml +RUN pip install coverage junit-xml ENV container=docker CMD ["/sbin/init"] diff --git a/test/utils/docker/centos7/Dockerfile b/test/utils/docker/centos7/Dockerfile index 922da6eeb3..f4056c38f1 100644 --- a/test/utils/docker/centos7/Dockerfile +++ b/test/utils/docker/centos7/Dockerfile @@ -29,7 +29,7 @@ RUN yum clean all && \ openssh-clients \ openssh-server \ openssl-devel \ - python-coverage \ + python-cryptography \ python-devel \ python-httplib2 \ python-jinja2 \ @@ -63,6 +63,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done -RUN pip install junit-xml +RUN pip install coverage junit-xml ENV container=docker CMD ["/usr/sbin/init"] diff --git a/test/utils/docker/fedora24/Dockerfile b/test/utils/docker/fedora24/Dockerfile index 82306f3d71..de51b664bd 100644 --- a/test/utils/docker/fedora24/Dockerfile +++ b/test/utils/docker/fedora24/Dockerfile @@ -35,8 +35,7 @@ RUN dnf clean all && \ openssh-server \ openssl-devel \ procps \ - python2-dnf \ - python-coverage \ + python-cryptography \ python-devel \ python-httplib2 \ python-jinja2 \ @@ -49,6 +48,7 @@ RUN dnf clean all && \ python-pip \ python-setuptools \ python-virtualenv \ + python2-dnf \ PyYAML \ rpm-build \ rubygems \ @@ -72,6 +72,6 @@ RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done -RUN pip install junit-xml +RUN pip install coverage junit-xml ENV container=docker CMD ["/usr/sbin/init"] diff --git a/test/utils/docker/fedora25/Dockerfile b/test/utils/docker/fedora25/Dockerfile index dd83ff56fe..a807c6ddf8 100644 --- a/test/utils/docker/fedora25/Dockerfile +++ b/test/utils/docker/fedora25/Dockerfile @@ -17,6 +17,7 @@ RUN dnf clean all && \ dbus-python \ file \ findutils \ + gcc \ git \ glibc-locale-source \ iproute \ @@ -30,8 +31,8 @@ RUN dnf clean all && \ openssh-server \ openssl-devel \ procps \ - python2-dnf \ - python-coverage \ + python-cryptography \ + python-devel \ python-httplib2 \ python-jinja2 \ python-keyczar \ @@ -43,6 +44,7 @@ RUN dnf clean all && \ python-pip \ python-setuptools \ python-virtualenv \ + python2-dnf \ PyYAML \ rpm-build \ rubygems \ @@ -66,6 +68,6 @@ RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \ ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done -RUN pip install junit-xml +RUN pip install coverage junit-xml ENV container=docker CMD ["/usr/sbin/init"] diff --git a/test/utils/docker/opensuse42.1/Dockerfile b/test/utils/docker/opensuse42.1/Dockerfile index 82fe949711..519e2604f9 100644 --- a/test/utils/docker/opensuse42.1/Dockerfile +++ b/test/utils/docker/opensuse42.1/Dockerfile @@ -20,7 +20,6 @@ RUN zypper --non-interactive --gpg-auto-import-keys refresh && \ mercurial \ openssh \ postgresql-server \ - python-coverage \ python-cryptography \ python-devel \ python-httplib2 \ @@ -72,6 +71,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done # explicitly enable the service, opensuse default to disabled services RUN systemctl enable sshd.service -RUN pip install junit-xml +RUN pip install coverage junit-xml ENV container=docker CMD ["/sbin/init"] diff --git a/test/utils/docker/opensuse42.2/Dockerfile b/test/utils/docker/opensuse42.2/Dockerfile index 14784c0500..fd013d6673 100644 --- a/test/utils/docker/opensuse42.2/Dockerfile +++ b/test/utils/docker/opensuse42.2/Dockerfile @@ -20,8 +20,8 @@ RUN zypper --non-interactive --gpg-auto-import-keys refresh && \ mercurial \ openssh \ postgresql-server \ - python-coverage \ python-cryptography \ + python-devel \ python-httplib2 \ python-jinja2 \ python-keyczar \ @@ -71,6 +71,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done # explicitly enable the service, opensuse default to disabled services RUN systemctl enable sshd.service -RUN pip install junit-xml +RUN pip install coverage junit-xml ENV container=docker CMD ["/sbin/init"] diff --git a/test/utils/docker/ubuntu1204/Dockerfile b/test/utils/docker/ubuntu1204/Dockerfile index 706940a7f9..a8c7a6db73 100644 --- a/test/utils/docker/ubuntu1204/Dockerfile +++ b/test/utils/docker/ubuntu1204/Dockerfile @@ -26,7 +26,6 @@ RUN apt-get update -y && \ mysql-server \ openssh-client \ openssh-server \ - python-coverage \ python-dev \ python-httplib2 \ python-jinja2 \ @@ -55,6 +54,7 @@ RUN apt-get update -y && \ apt-get clean RUN pip install --upgrade pycrypto cryptography + # helpful things taken from the ubuntu-upstart Dockerfile: # https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile ADD init-fake.conf /etc/init/fake-container-events.conf @@ -91,6 +91,7 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done VOLUME /sys/fs/cgroup /run/lock /run /tmp -RUN pip install junit-xml +RUN pip install pip --upgrade +RUN pip install coverage junit-xml ENV container=docker CMD ["/sbin/init"] diff --git a/test/utils/docker/ubuntu1404/Dockerfile b/test/utils/docker/ubuntu1404/Dockerfile index 5db28ee7f6..4bad078763 100644 --- a/test/utils/docker/ubuntu1404/Dockerfile +++ b/test/utils/docker/ubuntu1404/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update -y && \ dpkg-dev \ fakeroot \ gawk \ + gcc \ git \ libffi-dev \ libssl-dev \ @@ -25,7 +26,7 @@ RUN apt-get update -y && \ mysql-server \ openssh-client \ openssh-server \ - python-coverage \ + python-dev \ python-httplib2 \ python-jinja2 \ python-keyczar \ @@ -51,6 +52,8 @@ RUN apt-get update -y && \ && \ apt-get clean +RUN pip install --upgrade pycrypto cryptography + # helpful things taken from the ubuntu-upstart Dockerfile: # https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile ADD init-fake.conf /etc/init/fake-container-events.conf @@ -87,6 +90,7 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done VOLUME /sys/fs/cgroup /run/lock /run /tmp -RUN pip install junit-xml +RUN pip install pip --upgrade +RUN pip install coverage junit-xml ENV container=docker CMD ["/sbin/init"] diff --git a/test/utils/docker/ubuntu1604/Dockerfile b/test/utils/docker/ubuntu1604/Dockerfile index e7e1ebd6ef..f4825b3723 100644 --- a/test/utils/docker/ubuntu1604/Dockerfile +++ b/test/utils/docker/ubuntu1604/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update -y && \ dpkg-dev \ fakeroot \ gawk \ + gcc \ git \ iproute2 \ libffi-dev \ @@ -27,7 +28,8 @@ RUN apt-get update -y && \ mysql-server \ openssh-client \ openssh-server \ - python-coverage \ + python-cryptography \ + python-dev \ python-dbus \ python-httplib2 \ python-jinja2 \ @@ -64,6 +66,6 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done VOLUME /sys/fs/cgroup /run/lock /run /tmp -RUN pip install junit-xml +RUN pip install coverage junit-xml ENV container=docker CMD ["/sbin/init"] diff --git a/test/utils/docker/ubuntu1604py3/Dockerfile b/test/utils/docker/ubuntu1604py3/Dockerfile index bdab631ca7..98715f924d 100644 --- a/test/utils/docker/ubuntu1604py3/Dockerfile +++ b/test/utils/docker/ubuntu1604py3/Dockerfile @@ -13,6 +13,7 @@ RUN apt-get update -y && \ dpkg-dev \ fakeroot \ gawk \ + gcc \ git \ iproute2 \ libffi-dev \ @@ -24,7 +25,8 @@ RUN apt-get update -y && \ mysql-server \ openssh-client \ openssh-server \ - python3-coverage \ + python3-cryptography \ + python3-dev \ python3-dbus \ python3-httplib2 \ python3-jinja2 \ @@ -60,6 +62,6 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done VOLUME /sys/fs/cgroup /run/lock /run /tmp -RUN pip3 install junit-xml python3-keyczar +RUN pip3 install coverage junit-xml python3-keyczar ENV container=docker CMD ["/sbin/init"] |