Skip to content

Commit 4530eea

Browse files
authoredJun 23, 2017
Docker image updates for integration tests. (ansible#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.
1 parent 3e52f47 commit 4530eea

File tree

11 files changed

+33
-22
lines changed

11 files changed

+33
-22
lines changed
 

‎.coveragerc

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ omit =
2121
*/python*/dist-packages/*
2222
*/python*/site-packages/*
2323
*/python*/distutils/*
24+
*/pyshared/*
2425
*/pytest

‎test/utils/docker/centos6/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN yum clean all && \
1919
openssh-clients \
2020
openssh-server \
2121
openssl-devel \
22-
python-coverage \
22+
python-argparse \
2323
python-devel \
2424
python-httplib2 \
2525
python-jinja2 \
@@ -56,6 +56,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
5656
ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
5757
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
5858
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
59-
RUN pip install junit-xml
59+
RUN pip install coverage junit-xml
6060
ENV container=docker
6161
CMD ["/sbin/init"]

‎test/utils/docker/centos7/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN yum clean all && \
2929
openssh-clients \
3030
openssh-server \
3131
openssl-devel \
32-
python-coverage \
32+
python-cryptography \
3333
python-devel \
3434
python-httplib2 \
3535
python-jinja2 \
@@ -63,6 +63,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
6363
ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
6464
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
6565
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
66-
RUN pip install junit-xml
66+
RUN pip install coverage junit-xml
6767
ENV container=docker
6868
CMD ["/usr/sbin/init"]

‎test/utils/docker/fedora24/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ RUN dnf clean all && \
3535
openssh-server \
3636
openssl-devel \
3737
procps \
38-
python2-dnf \
39-
python-coverage \
38+
python-cryptography \
4039
python-devel \
4140
python-httplib2 \
4241
python-jinja2 \
@@ -49,6 +48,7 @@ RUN dnf clean all && \
4948
python-pip \
5049
python-setuptools \
5150
python-virtualenv \
51+
python2-dnf \
5252
PyYAML \
5353
rpm-build \
5454
rubygems \
@@ -72,6 +72,6 @@ RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
7272
ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
7373
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
7474
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
75-
RUN pip install junit-xml
75+
RUN pip install coverage junit-xml
7676
ENV container=docker
7777
CMD ["/usr/sbin/init"]

‎test/utils/docker/fedora25/Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN dnf clean all && \
1717
dbus-python \
1818
file \
1919
findutils \
20+
gcc \
2021
git \
2122
glibc-locale-source \
2223
iproute \
@@ -30,8 +31,8 @@ RUN dnf clean all && \
3031
openssh-server \
3132
openssl-devel \
3233
procps \
33-
python2-dnf \
34-
python-coverage \
34+
python-cryptography \
35+
python-devel \
3536
python-httplib2 \
3637
python-jinja2 \
3738
python-keyczar \
@@ -43,6 +44,7 @@ RUN dnf clean all && \
4344
python-pip \
4445
python-setuptools \
4546
python-virtualenv \
47+
python2-dnf \
4648
PyYAML \
4749
rpm-build \
4850
rubygems \
@@ -66,6 +68,6 @@ RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
6668
ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
6769
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
6870
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
69-
RUN pip install junit-xml
71+
RUN pip install coverage junit-xml
7072
ENV container=docker
7173
CMD ["/usr/sbin/init"]

‎test/utils/docker/opensuse42.1/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ RUN zypper --non-interactive --gpg-auto-import-keys refresh && \
2020
mercurial \
2121
openssh \
2222
postgresql-server \
23-
python-coverage \
2423
python-cryptography \
2524
python-devel \
2625
python-httplib2 \
@@ -72,6 +71,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
7271
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
7372
# explicitly enable the service, opensuse default to disabled services
7473
RUN systemctl enable sshd.service
75-
RUN pip install junit-xml
74+
RUN pip install coverage junit-xml
7675
ENV container=docker
7776
CMD ["/sbin/init"]

‎test/utils/docker/opensuse42.2/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ RUN zypper --non-interactive --gpg-auto-import-keys refresh && \
2020
mercurial \
2121
openssh \
2222
postgresql-server \
23-
python-coverage \
2423
python-cryptography \
24+
python-devel \
2525
python-httplib2 \
2626
python-jinja2 \
2727
python-keyczar \
@@ -71,6 +71,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
7171
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
7272
# explicitly enable the service, opensuse default to disabled services
7373
RUN systemctl enable sshd.service
74-
RUN pip install junit-xml
74+
RUN pip install coverage junit-xml
7575
ENV container=docker
7676
CMD ["/sbin/init"]

‎test/utils/docker/ubuntu1204/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ RUN apt-get update -y && \
2626
mysql-server \
2727
openssh-client \
2828
openssh-server \
29-
python-coverage \
3029
python-dev \
3130
python-httplib2 \
3231
python-jinja2 \
@@ -55,6 +54,7 @@ RUN apt-get update -y && \
5554
apt-get clean
5655

5756
RUN pip install --upgrade pycrypto cryptography
57+
5858
# helpful things taken from the ubuntu-upstart Dockerfile:
5959
# https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
6060
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 && \
9191
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
9292
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
9393
VOLUME /sys/fs/cgroup /run/lock /run /tmp
94-
RUN pip install junit-xml
94+
RUN pip install pip --upgrade
95+
RUN pip install coverage junit-xml
9596
ENV container=docker
9697
CMD ["/sbin/init"]

‎test/utils/docker/ubuntu1404/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN apt-get update -y && \
1515
dpkg-dev \
1616
fakeroot \
1717
gawk \
18+
gcc \
1819
git \
1920
libffi-dev \
2021
libssl-dev \
@@ -25,7 +26,7 @@ RUN apt-get update -y && \
2526
mysql-server \
2627
openssh-client \
2728
openssh-server \
28-
python-coverage \
29+
python-dev \
2930
python-httplib2 \
3031
python-jinja2 \
3132
python-keyczar \
@@ -51,6 +52,8 @@ RUN apt-get update -y && \
5152
&& \
5253
apt-get clean
5354

55+
RUN pip install --upgrade pycrypto cryptography
56+
5457
# helpful things taken from the ubuntu-upstart Dockerfile:
5558
# https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
5659
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 && \
8790
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
8891
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
8992
VOLUME /sys/fs/cgroup /run/lock /run /tmp
90-
RUN pip install junit-xml
93+
RUN pip install pip --upgrade
94+
RUN pip install coverage junit-xml
9195
ENV container=docker
9296
CMD ["/sbin/init"]

‎test/utils/docker/ubuntu1604/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN apt-get update -y && \
1515
dpkg-dev \
1616
fakeroot \
1717
gawk \
18+
gcc \
1819
git \
1920
iproute2 \
2021
libffi-dev \
@@ -27,7 +28,8 @@ RUN apt-get update -y && \
2728
mysql-server \
2829
openssh-client \
2930
openssh-server \
30-
python-coverage \
31+
python-cryptography \
32+
python-dev \
3133
python-dbus \
3234
python-httplib2 \
3335
python-jinja2 \
@@ -64,6 +66,6 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
6466
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
6567
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
6668
VOLUME /sys/fs/cgroup /run/lock /run /tmp
67-
RUN pip install junit-xml
69+
RUN pip install coverage junit-xml
6870
ENV container=docker
6971
CMD ["/sbin/init"]

‎test/utils/docker/ubuntu1604py3/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN apt-get update -y && \
1313
dpkg-dev \
1414
fakeroot \
1515
gawk \
16+
gcc \
1617
git \
1718
iproute2 \
1819
libffi-dev \
@@ -24,7 +25,8 @@ RUN apt-get update -y && \
2425
mysql-server \
2526
openssh-client \
2627
openssh-server \
27-
python3-coverage \
28+
python3-cryptography \
29+
python3-dev \
2830
python3-dbus \
2931
python3-httplib2 \
3032
python3-jinja2 \
@@ -60,6 +62,6 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
6062
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
6163
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
6264
VOLUME /sys/fs/cgroup /run/lock /run /tmp
63-
RUN pip3 install junit-xml python3-keyczar
65+
RUN pip3 install coverage junit-xml python3-keyczar
6466
ENV container=docker
6567
CMD ["/sbin/init"]

0 commit comments

Comments
 (0)
Please sign in to comment.