Browse code

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.

Matt Clay authored on 2017/06/24 04:45:38
Showing 11 changed files
... ...
@@ -21,4 +21,5 @@ omit =
21 21
     */python*/dist-packages/*
22 22
     */python*/site-packages/*
23 23
     */python*/distutils/*
24
+    */pyshared/*
24 25
     */pytest
... ...
@@ -19,7 +19,7 @@ RUN yum clean all && \
19 19
     openssh-clients \
20 20
     openssh-server \
21 21
     openssl-devel \
22
-    python-coverage \
22
+    python-argparse \
23 23
     python-devel \
24 24
     python-httplib2 \
25 25
     python-jinja2 \
... ...
@@ -56,6 +56,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
56 56
     ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
57 57
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
58 58
     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
60 60
 ENV container=docker
61 61
 CMD ["/sbin/init"]
... ...
@@ -29,7 +29,7 @@ RUN yum clean all && \
29 29
     openssh-clients \
30 30
     openssh-server \
31 31
     openssl-devel \
32
-    python-coverage \
32
+    python-cryptography \
33 33
     python-devel \
34 34
     python-httplib2 \
35 35
     python-jinja2 \
... ...
@@ -63,6 +63,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
63 63
     ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
64 64
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
65 65
     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
67 67
 ENV container=docker
68 68
 CMD ["/usr/sbin/init"]
... ...
@@ -35,8 +35,7 @@ RUN dnf clean all && \
35 35
     openssh-server \
36 36
     openssl-devel \
37 37
     procps \
38
-    python2-dnf \
39
-    python-coverage \
38
+    python-cryptography \
40 39
     python-devel \
41 40
     python-httplib2 \
42 41
     python-jinja2 \
... ...
@@ -49,6 +48,7 @@ RUN dnf clean all && \
49 49
     python-pip \
50 50
     python-setuptools \
51 51
     python-virtualenv \
52
+    python2-dnf \
52 53
     PyYAML \
53 54
     rpm-build \
54 55
     rubygems \
... ...
@@ -72,6 +72,6 @@ RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
72 72
     ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
73 73
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
74 74
     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
76 76
 ENV container=docker
77 77
 CMD ["/usr/sbin/init"]
... ...
@@ -17,6 +17,7 @@ RUN dnf clean all && \
17 17
     dbus-python \
18 18
     file \
19 19
     findutils \
20
+    gcc \
20 21
     git \
21 22
     glibc-locale-source \
22 23
     iproute \
... ...
@@ -30,8 +31,8 @@ RUN dnf clean all && \
30 30
     openssh-server \
31 31
     openssl-devel \
32 32
     procps \
33
-    python2-dnf \
34
-    python-coverage \
33
+    python-cryptography \
34
+    python-devel \
35 35
     python-httplib2 \
36 36
     python-jinja2 \
37 37
     python-keyczar \
... ...
@@ -43,6 +44,7 @@ RUN dnf clean all && \
43 43
     python-pip \
44 44
     python-setuptools \
45 45
     python-virtualenv \
46
+    python2-dnf \
46 47
     PyYAML \
47 48
     rpm-build \
48 49
     rubygems \
... ...
@@ -66,6 +68,6 @@ RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
66 66
     ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
67 67
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
68 68
     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
69
+RUN pip install coverage junit-xml
70 70
 ENV container=docker
71 71
 CMD ["/usr/sbin/init"]
... ...
@@ -20,7 +20,6 @@ RUN zypper --non-interactive --gpg-auto-import-keys refresh && \
20 20
     mercurial \
21 21
     openssh \
22 22
     postgresql-server \
23
-    python-coverage \
24 23
     python-cryptography \
25 24
     python-devel \
26 25
     python-httplib2 \
... ...
@@ -72,6 +71,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
72 72
     for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
73 73
 # explicitly enable the service, opensuse default to disabled services
74 74
 RUN systemctl enable sshd.service
75
-RUN pip install junit-xml
75
+RUN pip install coverage junit-xml
76 76
 ENV container=docker
77 77
 CMD ["/sbin/init"]
... ...
@@ -20,8 +20,8 @@ RUN zypper --non-interactive --gpg-auto-import-keys refresh && \
20 20
     mercurial \
21 21
     openssh \
22 22
     postgresql-server \
23
-    python-coverage \
24 23
     python-cryptography \
24
+    python-devel \
25 25
     python-httplib2 \
26 26
     python-jinja2 \
27 27
     python-keyczar \
... ...
@@ -71,6 +71,6 @@ RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
71 71
     for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
72 72
 # explicitly enable the service, opensuse default to disabled services
73 73
 RUN systemctl enable sshd.service
74
-RUN pip install junit-xml
74
+RUN pip install coverage junit-xml
75 75
 ENV container=docker
76 76
 CMD ["/sbin/init"]
... ...
@@ -26,7 +26,6 @@ RUN apt-get update -y && \
26 26
     mysql-server \
27 27
     openssh-client \
28 28
     openssh-server \
29
-    python-coverage \
30 29
     python-dev \
31 30
     python-httplib2 \
32 31
     python-jinja2 \
... ...
@@ -55,6 +54,7 @@ RUN apt-get update -y && \
55 55
     apt-get clean
56 56
 
57 57
 RUN pip install --upgrade pycrypto cryptography
58
+
58 59
 # helpful things taken from the ubuntu-upstart Dockerfile:
59 60
 # https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
60 61
 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 && \
91 91
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
92 92
     for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
93 93
 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
95 96
 ENV container=docker
96 97
 CMD ["/sbin/init"]
... ...
@@ -15,6 +15,7 @@ RUN apt-get update -y && \
15 15
     dpkg-dev \
16 16
     fakeroot \
17 17
     gawk \
18
+    gcc \
18 19
     git \
19 20
     libffi-dev \
20 21
     libssl-dev \
... ...
@@ -25,7 +26,7 @@ RUN apt-get update -y && \
25 25
     mysql-server \
26 26
     openssh-client \
27 27
     openssh-server \
28
-    python-coverage \
28
+    python-dev \
29 29
     python-httplib2 \
30 30
     python-jinja2 \
31 31
     python-keyczar \
... ...
@@ -51,6 +52,8 @@ RUN apt-get update -y && \
51 51
     && \
52 52
     apt-get clean
53 53
 
54
+RUN pip install --upgrade pycrypto cryptography
55
+
54 56
 # helpful things taken from the ubuntu-upstart Dockerfile:
55 57
 # https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
56 58
 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 && \
87 87
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
88 88
     for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
89 89
 VOLUME /sys/fs/cgroup /run/lock /run /tmp
90
-RUN pip install junit-xml
90
+RUN pip install pip --upgrade
91
+RUN pip install coverage junit-xml
91 92
 ENV container=docker
92 93
 CMD ["/sbin/init"]
... ...
@@ -15,6 +15,7 @@ RUN apt-get update -y && \
15 15
     dpkg-dev \
16 16
     fakeroot \
17 17
     gawk \
18
+    gcc \
18 19
     git \
19 20
     iproute2 \
20 21
     libffi-dev \
... ...
@@ -27,7 +28,8 @@ RUN apt-get update -y && \
27 27
     mysql-server \
28 28
     openssh-client \
29 29
     openssh-server \
30
-    python-coverage \
30
+    python-cryptography \
31
+    python-dev \
31 32
     python-dbus \
32 33
     python-httplib2 \
33 34
     python-jinja2 \
... ...
@@ -64,6 +66,6 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
64 64
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
65 65
     for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
66 66
 VOLUME /sys/fs/cgroup /run/lock /run /tmp
67
-RUN pip install junit-xml
67
+RUN pip install coverage junit-xml
68 68
 ENV container=docker
69 69
 CMD ["/sbin/init"]
... ...
@@ -13,6 +13,7 @@ RUN apt-get update -y && \
13 13
     dpkg-dev \
14 14
     fakeroot \
15 15
     gawk \
16
+    gcc \
16 17
     git \
17 18
     iproute2 \
18 19
     libffi-dev \
... ...
@@ -24,7 +25,8 @@ RUN apt-get update -y && \
24 24
     mysql-server \
25 25
     openssh-client \
26 26
     openssh-server \
27
-    python3-coverage \
27
+    python3-cryptography \
28
+    python3-dev \
28 29
     python3-dbus \
29 30
     python3-httplib2 \
30 31
     python3-jinja2 \
... ...
@@ -60,6 +62,6 @@ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
60 60
     cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
61 61
     for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
62 62
 VOLUME /sys/fs/cgroup /run/lock /run /tmp
63
-RUN pip3 install junit-xml python3-keyczar
63
+RUN pip3 install coverage junit-xml python3-keyczar
64 64
 ENV container=docker
65 65
 CMD ["/sbin/init"]