diff --git a/templates/tools/dockerfile/debian_testing_repo.include b/templates/tools/dockerfile/debian_testing_repo.include deleted file mode 100644 index 1a5248e226408c129fcba65f6a35804f08752b60..0000000000000000000000000000000000000000 --- a/templates/tools/dockerfile/debian_testing_repo.include +++ /dev/null @@ -1,3 +0,0 @@ -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template index f584a2378eb5c02617b06eb10ef391d29faedca4..ac939620d0741e12e4a9ff1a7cb189208625a4ba 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template @@ -16,5 +16,5 @@ <%include file="../../python_stretch.include"/> - RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev + RUN apt-get update && apt-get -t stable install -y python3.7 python3-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 diff --git a/templates/tools/dockerfile/python_stretch.include b/templates/tools/dockerfile/python_stretch.include index 45bafe51842b5420aa94e143fcd2c4bd4bec73a0..43ba98ae64c71d09c0f65d746c1c01097daf66bc 100644 --- a/templates/tools/dockerfile/python_stretch.include +++ b/templates/tools/dockerfile/python_stretch.include @@ -3,7 +3,9 @@ FROM debian:stretch <%include file="./apt_get_basic.include"/> <%include file="./gcp_api_libraries.include"/> <%include file="./apt_get_python_27.include"/> -<%include file="./debian_testing_repo.include"/> +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local <%include file="./run_tests_addons.include"/> # Define the default command. CMD ["bash"] diff --git a/templates/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile.template index a5dcf196f2b21d717800ebfaee978ca36b296fce..2c2cb6de08b52a987103206d73b71adfa022df7b 100644 --- a/templates/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile.template @@ -16,5 +16,17 @@ <%include file="../../python_stretch.include"/> - RUN apt-get update && apt-get -t testing install -y python3.6 python3-all-dev - RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6 + RUN apt-get install -y jq zlib1g-dev libssl-dev + + RUN apt-get install -y jq build-essential libffi-dev + + RUN cd /tmp && ${'\\'} + wget -q https://github.com/python/cpython/archive/v3.6.9.tar.gz && ${'\\'} + tar xzvf v3.6.9.tar.gz && ${'\\'} + cd cpython-3.6.9 && ${'\\'} + ./configure && ${'\\'} + make install + + RUN python3.6 -m ensurepip && ${'\\'} + python3.6 -m pip install coverage + diff --git a/templates/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile.template index c3602f6c5122091c8770ac674173191569f81bfe..c4270bdfc89218769fb27b260c0db09e89a17833 100644 --- a/templates/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile.template @@ -16,7 +16,7 @@ <%include file="../../python_stretch.include"/> - RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev + RUN apt-get update && apt-get -t buster install -y python3.7 python3-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 # for Python test coverage reporting diff --git a/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template index 8f2585a4d591828aef9791f6040f01422312d3fb..841a7f51b517bfc2804b3d453f2585681deda220 100644 --- a/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template @@ -18,11 +18,14 @@ <%include file="../../python_stretch.include"/> RUN apt-get install -y jq zlib1g-dev libssl-dev - COPY get_cpython.sh /tmp - RUN apt-get install -y jq build-essential libffi-dev && ${'\\'} - chmod +x /tmp/get_cpython.sh && ${'\\'} - /tmp/get_cpython.sh && ${'\\'} - rm /tmp/get_cpython.sh + RUN apt-get install -y jq build-essential libffi-dev + + RUN cd /tmp && ${'\\'} + wget -q https://github.com/python/cpython/archive/v3.8.0b3.tar.gz && ${'\\'} + tar xzvf v3.8.0b3.tar.gz && ${'\\'} + cd cpython-3.8.0b3 && ${'\\'} + ./configure && ${'\\'} + make install RUN python3.8 -m ensurepip && ${'\\'} python3.8 -m pip install coverage diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index 2e4bdf537b782d26f76b1ac70b6a9d507b31b876..84a4049be0e074a0c486d3d94dc2f55783139469 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -18,7 +18,7 @@ <%include file="../../cxx_deps.include"/> #======================== # Sanity test dependencies - RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev + RUN apt-get update && apt-get -t buster install -y python3.7 python3-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 # Make Python 3.7 the default Python 3 version RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 diff --git a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile index acad500f90cfdb433c95be648c220cd73c4b0961..b11a1a1aa317a08bbaedb768b5ab62ce36632d36 100644 --- a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile @@ -57,10 +57,9 @@ RUN pip install --upgrade google-api-python-client oauth2client RUN apt-get update && apt-get install -y python2.7 python-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local - +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local RUN mkdir /var/local/jenkins @@ -68,5 +67,5 @@ RUN mkdir /var/local/jenkins CMD ["bash"] -RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev +RUN apt-get update && apt-get -t stable install -y python3.7 python3-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 diff --git a/tools/dockerfile/test/python_stretch_2.7_x64/Dockerfile b/tools/dockerfile/test/python_stretch_2.7_x64/Dockerfile index a7a8174db484cab2496e45669d5c7d63b689df30..92b18e740dac59774d87685a00342a9948a4a0db 100644 --- a/tools/dockerfile/test/python_stretch_2.7_x64/Dockerfile +++ b/tools/dockerfile/test/python_stretch_2.7_x64/Dockerfile @@ -57,10 +57,9 @@ RUN pip install --upgrade google-api-python-client oauth2client RUN apt-get update && apt-get install -y python2.7 python-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local - +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/python_stretch_3.5_x64/Dockerfile b/tools/dockerfile/test/python_stretch_3.5_x64/Dockerfile index 0e97e77e2fd220b9950d015dbfdfb5ef9b7839e3..7a256edffb2b2e90479aeac870d0daf622e1b7d3 100644 --- a/tools/dockerfile/test/python_stretch_3.5_x64/Dockerfile +++ b/tools/dockerfile/test/python_stretch_3.5_x64/Dockerfile @@ -57,10 +57,9 @@ RUN pip install --upgrade google-api-python-client oauth2client RUN apt-get update && apt-get install -y python2.7 python-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local - +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile b/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile index 9b16b2d3a1d4d38d9b3c8b99c5b2e57bb18e70a7..f18af6604886630c5834114e4545d706082e4b1f 100644 --- a/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile +++ b/tools/dockerfile/test/python_stretch_3.6_x64/Dockerfile @@ -57,10 +57,9 @@ RUN pip install --upgrade google-api-python-client oauth2client RUN apt-get update && apt-get install -y python2.7 python-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local - +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local RUN mkdir /var/local/jenkins @@ -68,5 +67,16 @@ RUN mkdir /var/local/jenkins CMD ["bash"] -RUN apt-get update && apt-get -t testing install -y python3.6 python3-all-dev -RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6 +RUN apt-get install -y jq zlib1g-dev libssl-dev + +RUN apt-get install -y jq build-essential libffi-dev + +RUN cd /tmp && \ + wget -q https://github.com/python/cpython/archive/v3.6.9.tar.gz && \ + tar xzvf v3.6.9.tar.gz && \ + cd cpython-3.6.9 && \ + ./configure && \ + make install + +RUN python3.6 -m ensurepip && \ + python3.6 -m pip install coverage diff --git a/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile b/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile index 45291ffdcfc08167de5d96509ca5c9032f5aeb23..46b6526dc69e705bcd08e97cd4e6fa9f7edee44e 100644 --- a/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile +++ b/tools/dockerfile/test/python_stretch_3.7_x64/Dockerfile @@ -57,10 +57,9 @@ RUN pip install --upgrade google-api-python-client oauth2client RUN apt-get update && apt-get install -y python2.7 python-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local - +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local RUN mkdir /var/local/jenkins @@ -68,7 +67,7 @@ RUN mkdir /var/local/jenkins CMD ["bash"] -RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev +RUN apt-get update && apt-get -t buster install -y python3.7 python3-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 # for Python test coverage reporting diff --git a/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile b/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile index d5ecbc7110a2b0624a9a6afd7f0013c84286677e..495d86fd0995e14d2f1123a6d30143fbf15a79e2 100644 --- a/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile +++ b/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile @@ -57,10 +57,9 @@ RUN pip install --upgrade google-api-python-client oauth2client RUN apt-get update && apt-get install -y python2.7 python-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local - +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local RUN mkdir /var/local/jenkins @@ -69,11 +68,14 @@ CMD ["bash"] RUN apt-get install -y jq zlib1g-dev libssl-dev -COPY get_cpython.sh /tmp -RUN apt-get install -y jq build-essential libffi-dev && \ - chmod +x /tmp/get_cpython.sh && \ - /tmp/get_cpython.sh && \ - rm /tmp/get_cpython.sh +RUN apt-get install -y jq build-essential libffi-dev + +RUN cd /tmp && \ + wget -q https://github.com/python/cpython/archive/v3.8.0b3.tar.gz && \ + tar xzvf v3.8.0b3.tar.gz && \ + cd cpython-3.8.0b3 && \ + ./configure && \ + make install RUN python3.8 -m ensurepip && \ python3.8 -m pip install coverage diff --git a/tools/dockerfile/test/python_stretch_3.8_x64/get_cpython.sh b/tools/dockerfile/test/python_stretch_3.8_x64/get_cpython.sh deleted file mode 100644 index e051e974b389d7e9e7e0deddeaebc3eb3ede09b1..0000000000000000000000000000000000000000 --- a/tools/dockerfile/test/python_stretch_3.8_x64/get_cpython.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright 2019 The gRPC Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -VERSION_REGEX="v3.8.*" -REPO="python/cpython" - -LATEST=$(curl -s https://api.github.com/repos/$REPO/tags | \ - jq -r '.[] | select(.name|test("'$VERSION_REGEX'")) | .name' \ - | sort | tail -n1) - -wget https://github.com/$REPO/archive/$LATEST.tar.gz -tar xzvf *.tar.gz -( cd cpython* - ./configure - make install -) diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index ca786e264edb737d4eeeea288604f29a6f3e81f1..675378b305b90983ac4431b4da6c689e84bf1d95 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -57,10 +57,9 @@ RUN pip install --upgrade google-api-python-client oauth2client RUN apt-get update && apt-get install -y python2.7 python-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 -# Add Debian 'testing' repository -RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list -RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local - +# Add Debian 'buster' repository, we will need it for installing newer versions of python +RUN echo 'deb http://ftp.de.debian.org/debian buster main' >> /etc/apt/sources.list +RUN echo 'APT::Default-Release "stretch";' | tee -a /etc/apt/apt.conf.d/00local RUN mkdir /var/local/jenkins @@ -73,7 +72,7 @@ RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev c #======================== # Sanity test dependencies -RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev +RUN apt-get update && apt-get -t buster install -y python3.7 python3-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 # Make Python 3.7 the default Python 3 version RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1