Browse Source

Drop 3.3, 3.4 and use single version docker images for all python tests (#7396)

* Create a new docker image for python 3.6

The previous one cannot build, because python3.6 was removed from
stretch.

* Drop support for 3.3 and 3.4

Also update all docker file to be single version
Paul Yang 5 years ago
parent
commit
f15ac4091f
31 changed files with 126 additions and 259 deletions
  1. 0 0
      README.md
  2. 1 1
      kokoro/linux/dockerfile/push_testing_images.sh
  3. 23 0
      kokoro/linux/dockerfile/test/python27/Dockerfile
  4. 23 0
      kokoro/linux/dockerfile/test/python35/Dockerfile
  5. 23 0
      kokoro/linux/dockerfile/test/python36/Dockerfile
  6. 23 0
      kokoro/linux/dockerfile/test/python37/Dockerfile
  7. 23 0
      kokoro/linux/dockerfile/test/python38/Dockerfile
  8. 0 39
      kokoro/linux/dockerfile/test/python_jessie/Dockerfile
  9. 0 49
      kokoro/linux/dockerfile/test/python_stretch/Dockerfile
  10. 1 1
      kokoro/linux/python27/build.sh
  11. 1 1
      kokoro/linux/python27_cpp/build.sh
  12. 0 18
      kokoro/linux/python33/build.sh
  13. 0 11
      kokoro/linux/python33/continuous.cfg
  14. 0 11
      kokoro/linux/python33/presubmit.cfg
  15. 0 18
      kokoro/linux/python33_cpp/build.sh
  16. 0 11
      kokoro/linux/python33_cpp/continuous.cfg
  17. 0 11
      kokoro/linux/python33_cpp/presubmit.cfg
  18. 0 18
      kokoro/linux/python34/build.sh
  19. 0 11
      kokoro/linux/python34/continuous.cfg
  20. 0 11
      kokoro/linux/python34/presubmit.cfg
  21. 0 18
      kokoro/linux/python34_cpp/build.sh
  22. 0 11
      kokoro/linux/python34_cpp/continuous.cfg
  23. 0 11
      kokoro/linux/python34_cpp/presubmit.cfg
  24. 1 1
      kokoro/linux/python35/build.sh
  25. 1 1
      kokoro/linux/python35_cpp/build.sh
  26. 1 1
      kokoro/linux/python36/build.sh
  27. 1 1
      kokoro/linux/python36_cpp/build.sh
  28. 1 1
      kokoro/linux/python37/build.sh
  29. 1 1
      kokoro/linux/python37_cpp/build.sh
  30. 1 1
      kokoro/linux/python38/build.sh
  31. 1 1
      kokoro/linux/python38_cpp/build.sh

File diff suppressed because it is too large
+ 0 - 0
README.md


+ 1 - 1
kokoro/linux/dockerfile/push_testing_images.sh

@@ -8,7 +8,7 @@ cd kokoro/linux/dockerfile
 
 
 DOCKERHUB_ORGANIZATION=protobuftesting
 DOCKERHUB_ORGANIZATION=protobuftesting
 
 
-for DOCKERFILE_DIR in test/* release/*
+for DOCKERFILE_DIR in test/*
 do
 do
   # Generate image name based on Dockerfile checksum. That works well as long
   # Generate image name based on Dockerfile checksum. That works well as long
   # as can count on dockerfiles being written in a way that changing the logical
   # as can count on dockerfiles being written in a way that changing the logical

+ 23 - 0
kokoro/linux/dockerfile/test/python27/Dockerfile

@@ -0,0 +1,23 @@
+FROM python:2.7-buster
+
+# Install dependencies.  We start with the basic ones require to build protoc
+# and the C++ build
+RUN apt-get update && apt-get install -y \
+  autoconf \
+  autotools-dev \
+  build-essential \
+  bzip2 \
+  ccache \
+  curl \
+  gcc \
+  git \
+  libc6 \
+  libc6-dbg \
+  libc6-dev \
+  libgtest-dev \
+  libtool \
+  make \
+  parallel \
+  time \
+  wget \
+  && apt-get clean

+ 23 - 0
kokoro/linux/dockerfile/test/python35/Dockerfile

@@ -0,0 +1,23 @@
+FROM python:3.5-buster
+
+# Install dependencies.  We start with the basic ones require to build protoc
+# and the C++ build
+RUN apt-get update && apt-get install -y \
+  autoconf \
+  autotools-dev \
+  build-essential \
+  bzip2 \
+  ccache \
+  curl \
+  gcc \
+  git \
+  libc6 \
+  libc6-dbg \
+  libc6-dev \
+  libgtest-dev \
+  libtool \
+  make \
+  parallel \
+  time \
+  wget \
+  && apt-get clean

+ 23 - 0
kokoro/linux/dockerfile/test/python36/Dockerfile

@@ -0,0 +1,23 @@
+FROM python:3.6-buster
+
+# Install dependencies.  We start with the basic ones require to build protoc
+# and the C++ build
+RUN apt-get update && apt-get install -y \
+  autoconf \
+  autotools-dev \
+  build-essential \
+  bzip2 \
+  ccache \
+  curl \
+  gcc \
+  git \
+  libc6 \
+  libc6-dbg \
+  libc6-dev \
+  libgtest-dev \
+  libtool \
+  make \
+  parallel \
+  time \
+  wget \
+  && apt-get clean

+ 23 - 0
kokoro/linux/dockerfile/test/python37/Dockerfile

@@ -0,0 +1,23 @@
+FROM python:3.7-buster
+
+# Install dependencies.  We start with the basic ones require to build protoc
+# and the C++ build
+RUN apt-get update && apt-get install -y \
+  autoconf \
+  autotools-dev \
+  build-essential \
+  bzip2 \
+  ccache \
+  curl \
+  gcc \
+  git \
+  libc6 \
+  libc6-dbg \
+  libc6-dev \
+  libgtest-dev \
+  libtool \
+  make \
+  parallel \
+  time \
+  wget \
+  && apt-get clean

+ 23 - 0
kokoro/linux/dockerfile/test/python38/Dockerfile

@@ -0,0 +1,23 @@
+FROM python:3.8-buster
+
+# Install dependencies.  We start with the basic ones require to build protoc
+# and the C++ build
+RUN apt-get update && apt-get install -y \
+  autoconf \
+  autotools-dev \
+  build-essential \
+  bzip2 \
+  ccache \
+  curl \
+  gcc \
+  git \
+  libc6 \
+  libc6-dbg \
+  libc6-dev \
+  libgtest-dev \
+  libtool \
+  make \
+  parallel \
+  time \
+  wget \
+  && apt-get clean

+ 0 - 39
kokoro/linux/dockerfile/test/python_jessie/Dockerfile

@@ -1,39 +0,0 @@
-FROM debian:jessie
-
-# Install dependencies.  We start with the basic ones require to build protoc
-# and the C++ build
-RUN apt-get update && apt-get install -y \
-  autoconf \
-  autotools-dev \
-  build-essential \
-  bzip2 \
-  ccache \
-  curl \
-  gcc \
-  git \
-  libc6 \
-  libc6-dbg \
-  libc6-dev \
-  libgtest-dev \
-  libtool \
-  make \
-  parallel \
-  time \
-  wget \
-  && apt-get clean
-
-# Install python dependencies
-RUN apt-get update && apt-get install -y \
-  python-setuptools \
-  python-all-dev \
-  python3-all-dev \
-  python-pip
-
-# Install Python packages from PyPI
-RUN pip install --upgrade pip==10.0.1
-RUN pip install virtualenv
-RUN pip install six==1.10.0 twisted==17.5.0
-
-# Install pip and virtualenv for Python 3.4
-RUN curl https://bootstrap.pypa.io/get-pip.py | python3.4
-RUN python3.4 -m pip install virtualenv

+ 0 - 49
kokoro/linux/dockerfile/test/python_stretch/Dockerfile

@@ -1,49 +0,0 @@
-FROM debian:stretch
-
-# Install dependencies.  We start with the basic ones require to build protoc
-# and the C++ build
-RUN apt-get update && apt-get install -y \
-  autoconf \
-  autotools-dev \
-  build-essential \
-  bzip2 \
-  ccache \
-  curl \
-  gcc \
-  git \
-  libc6 \
-  libc6-dbg \
-  libc6-dev \
-  libgtest-dev \
-  libtool \
-  make \
-  parallel \
-  time \
-  wget \
-  && apt-get clean
-
-# Install Python 2.7
-RUN apt-get update && apt-get install -y python2.7 python-all-dev
-RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7
-
-# Install python dependencies
-RUN apt-get update && apt-get install -y \
-  python-setuptools \
-  python-pip
-
-# 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
-
-# Install Python3
-RUN apt-get update && apt-get -t testing install -y \
-  python3.5 \
-  python3.6 \
-  python3.7 \
-  python3.8 \
-  python3-all-dev
-
-RUN curl https://bootstrap.pypa.io/get-pip.py | python3.5
-RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
-RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7
-RUN curl https://bootstrap.pypa.io/get-pip.py | python3.8

+ 1 - 1
kokoro/linux/python27/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_jessie
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python27
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python27"
 export TEST_SET="python27"

+ 1 - 1
kokoro/linux/python27_cpp/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_jessie
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python27
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python27_cpp"
 export TEST_SET="python27_cpp"

+ 0 - 18
kokoro/linux/python33/build.sh

@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# This is the top-level script we give to Kokoro as the entry point for
-# running the "pull request" project:
-#
-# This script selects a specific Dockerfile (for building a Docker image) and
-# a script to run inside that image.  Then we delegate to the general
-# build_and_run_docker.sh script.
-
-# Change to repo root
-cd $(dirname $0)/../../..
-
-export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_jessie
-export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
-export OUTPUT_DIR=testoutput
-export TEST_SET="python33"
-./kokoro/linux/build_and_run_docker.sh

+ 0 - 11
kokoro/linux/python33/continuous.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 0 - 11
kokoro/linux/python33/presubmit.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 0 - 18
kokoro/linux/python33_cpp/build.sh

@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# This is the top-level script we give to Kokoro as the entry point for
-# running the "pull request" project:
-#
-# This script selects a specific Dockerfile (for building a Docker image) and
-# a script to run inside that image.  Then we delegate to the general
-# build_and_run_docker.sh script.
-
-# Change to repo root
-cd $(dirname $0)/../../..
-
-export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_jessie
-export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
-export OUTPUT_DIR=testoutput
-export TEST_SET="python33_cpp"
-./kokoro/linux/build_and_run_docker.sh

+ 0 - 11
kokoro/linux/python33_cpp/continuous.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 0 - 11
kokoro/linux/python33_cpp/presubmit.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 0 - 18
kokoro/linux/python34/build.sh

@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# This is the top-level script we give to Kokoro as the entry point for
-# running the "pull request" project:
-#
-# This script selects a specific Dockerfile (for building a Docker image) and
-# a script to run inside that image.  Then we delegate to the general
-# build_and_run_docker.sh script.
-
-# Change to repo root
-cd $(dirname $0)/../../..
-
-export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_jessie
-export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
-export OUTPUT_DIR=testoutput
-export TEST_SET="python34"
-./kokoro/linux/build_and_run_docker.sh

+ 0 - 11
kokoro/linux/python34/continuous.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 0 - 11
kokoro/linux/python34/presubmit.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 0 - 18
kokoro/linux/python34_cpp/build.sh

@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# This is the top-level script we give to Kokoro as the entry point for
-# running the "pull request" project:
-#
-# This script selects a specific Dockerfile (for building a Docker image) and
-# a script to run inside that image.  Then we delegate to the general
-# build_and_run_docker.sh script.
-
-# Change to repo root
-cd $(dirname $0)/../../..
-
-export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_jessie
-export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
-export OUTPUT_DIR=testoutput
-export TEST_SET="python34_cpp"
-./kokoro/linux/build_and_run_docker.sh

+ 0 - 11
kokoro/linux/python34_cpp/continuous.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 0 - 11
kokoro/linux/python34_cpp/presubmit.cfg

@@ -1,11 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
-timeout_mins: 120
-
-action {
-  define_artifacts {
-    regex: "**/sponge_log.xml"
-  }
-}

+ 1 - 1
kokoro/linux/python35/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python35
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python35"
 export TEST_SET="python35"

+ 1 - 1
kokoro/linux/python35_cpp/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python35
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python35_cpp"
 export TEST_SET="python35_cpp"

+ 1 - 1
kokoro/linux/python36/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python36
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python36"
 export TEST_SET="python36"

+ 1 - 1
kokoro/linux/python36_cpp/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python36
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python36_cpp"
 export TEST_SET="python36_cpp"

+ 1 - 1
kokoro/linux/python37/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python37
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python37"
 export TEST_SET="python37"

+ 1 - 1
kokoro/linux/python37_cpp/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python37
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python37_cpp"
 export TEST_SET="python37_cpp"

+ 1 - 1
kokoro/linux/python38/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python38
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python38"
 export TEST_SET="python38"

+ 1 - 1
kokoro/linux/python38_cpp/build.sh

@@ -11,7 +11,7 @@
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
 export DOCKERHUB_ORGANIZATION=protobuftesting
 export DOCKERHUB_ORGANIZATION=protobuftesting
-export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
+export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python38
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
 export OUTPUT_DIR=testoutput
 export OUTPUT_DIR=testoutput
 export TEST_SET="python38_cpp"
 export TEST_SET="python38_cpp"

Some files were not shown because too many files changed in this diff