diff --git a/templates/tools/dockerfile/git-jenkins.include b/templates/tools/dockerfile/git-jenkins.include new file mode 100644 index 00000000000..e87732248e7 --- /dev/null +++ b/templates/tools/dockerfile/git-jenkins.include @@ -0,0 +1,5 @@ +#================= +# Setup git to access working directory across docker boundary + +RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global protocol.file.allow always diff --git a/templates/tools/dockerfile/test/bazel/Dockerfile.template b/templates/tools/dockerfile/test/bazel/Dockerfile.template index 97531af00de..c241a737752 100644 --- a/templates/tools/dockerfile/test/bazel/Dockerfile.template +++ b/templates/tools/dockerfile/test/bazel/Dockerfile.template @@ -16,10 +16,9 @@ <%include file="../../oss_fuzz_base.include"/> <%include file="../../bazel.include"/> + <%include file="../../git-jenkins.include"/> RUN mkdir -p /var/local/jenkins - RUN git config --global --add safe.directory /var/local/jenkins/grpc - # Define the default command. CMD ["bash"] diff --git a/templates/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile.template index 977c223b30c..3bce77078cd 100644 --- a/templates/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile.template @@ -18,10 +18,10 @@ RUN apt-get update && apt-get install -y build-essential curl git time wget zip && apt-get clean <%include file="../../run_tests_python_deps.include"/> - <%include file="../../cxx_deps.include"/> <%include file="../../cmake.include"/> <%include file="../../ccache.include"/> <%include file="../../run_tests_addons.include"/> - + <%include file="../../git-jenkins.include"/> + # Define the default command. CMD ["bash"] diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index 1516245655b..519ad07a5dc 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -17,7 +17,6 @@ FROM silkeh/clang:15-bullseye <%include file="../../apt_get_basic.include"/> - <%include file="../../cxx_deps.include"/> # Install Python 3.7 from source (and installed as a default python3) # (Bullseye comes with Python 3.9 which isn't supported by pytype yet) @@ -60,6 +59,7 @@ <%include file="../../bazel.include"/> <%include file="../../buildifier.include"/> + <%include file="../../git-jenkins.include"/> # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/test/bazel.current_version b/tools/dockerfile/test/bazel.current_version index 4159a02ccc6..6cdeb3fb21d 100644 --- a/tools/dockerfile/test/bazel.current_version +++ b/tools/dockerfile/test/bazel.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/bazel:2345e87c22697f699d33a64d305a0177ce77e5f5@sha256:b42f10625321296c7f646e1e82023d0b46e4f9b6d2205cff2b49352c5dc1ce9f \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/bazel:b3e48464a04576cc42dd4f946feaf4fec1eca447@sha256:1faf10ff176c391507a5a4ed7b0c513d95bcd9f5a71877796d00a48039a67f55 \ No newline at end of file diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile index f3992448832..0af8eeacc4a 100644 --- a/tools/dockerfile/test/bazel/Dockerfile +++ b/tools/dockerfile/test/bazel/Dockerfile @@ -57,10 +57,14 @@ RUN BAZEL_ARCH_SUFFIX="$(uname -m | sed s/aarch64/arm64/)" \ # The binary will work correctly when run on real arm64 # hardware, when qemu-user-static isn't getting into the way. - -RUN mkdir -p /var/local/jenkins +#================= +# Setup git to access working directory across docker boundary RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global protocol.file.allow always + + +RUN mkdir -p /var/local/jenkins # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/test/cxx_clang_15_x64.current_version b/tools/dockerfile/test/cxx_clang_15_x64.current_version index 12b8bd465b2..2259255e552 100644 --- a/tools/dockerfile/test/cxx_clang_15_x64.current_version +++ b/tools/dockerfile/test/cxx_clang_15_x64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_15_x64:890005619b89999b0bb3256a3f13d8bda9a1560a@sha256:cb24820cb9c660220495317c519d93c34374f7d6dd152e89723734b298dbd0ea \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_15_x64:99325d14f5121515b2454bfab9b59c155e182c18@sha256:906c0ca1edcab595fce313636528e6244d8fc914a6e72a22764e96208f465936 \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile b/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile index c1ce96eb1f5..e6d60b4a00c 100644 --- a/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_clang_15_x64/Dockerfile @@ -40,10 +40,6 @@ RUN python3 -m pip install six==1.16.0 RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0 -#================= -# C++ dependencies -RUN apt-get update && apt-get -y install libc++-dev clang && apt-get clean - #================= # Install cmake # Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement. @@ -67,6 +63,12 @@ RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/downloa RUN mkdir /var/local/jenkins +#================= +# Setup git to access working directory across docker boundary + +RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global protocol.file.allow always + # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/test/sanity.current_version b/tools/dockerfile/test/sanity.current_version index a829bfcf152..4a30f56f276 100644 --- a/tools/dockerfile/test/sanity.current_version +++ b/tools/dockerfile/test/sanity.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:48ab42c150a5f94cfbdfa339c14c2f0c8f174e12@sha256:08856cbe711e1817b3ca0caead550020a97ef68b0b9ff48637d44ef24a205964 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:66c9d7a730029cfb6fb74cc8fa722927fd70bc79@sha256:d3bfac6827ec0e9e0103e8dabc8ba535e09af5e1a1305943f1464975de38d848 \ No newline at end of file diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index f148a9a2c6c..1e6214513ce 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -53,10 +53,6 @@ RUN apt-get update && apt-get install -y \ zip \ && apt-get clean -#================= -# C++ dependencies -RUN apt-get update && apt-get -y install libc++-dev clang && apt-get clean - # Install Python 3.7 from source (and installed as a default python3) # (Bullseye comes with Python 3.9 which isn't supported by pytype yet) @@ -130,6 +126,12 @@ RUN wget https://github.com/bazelbuild/buildtools/releases/download/0.29.0/build RUN chmod +x buildifier RUN mv buildifier /usr/local/bin +#================= +# Setup git to access working directory across docker boundary + +RUN git config --global --add safe.directory /var/local/jenkins/grpc +RUN git config --global protocol.file.allow always + # Define the default command. CMD ["bash"]