[test] Update NDK image with newer CMake (#34341)

1. Switch to CMake 1.18.
2. Make ergonomic change to push_testing_images.sh to allow building
just a single image.
3. Update packages to reduce a number of vulnerabilities reported.
pull/34355/head
Eugene Ostroukhov 1 year ago committed by GitHub
parent 8d62fc2b0b
commit 58f1c74383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      templates/tools/dockerfile/test/android_ndk/Dockerfile.template
  2. 2
      tools/bazelify_tests/dockerimage_current_versions.bzl
  3. 2
      tools/dockerfile/test/android_ndk.current_version
  4. 6
      tools/dockerfile/test/android_ndk/Dockerfile

@ -20,6 +20,7 @@
<%include file="../../run_tests_python_deps.include"/>
<%include file="../../cmake.include"/>
<%include file="../../run_tests_addons.include"/>
RUN apt update && apt upgrade -y
# Java required by Android SDK (using Eclipse Temurin Package)
RUN apt install -y wget apt-transport-https && ${'\\'}
@ -28,6 +29,9 @@
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
RUN apt update && apt install -y temurin-8-jdk
RUN apt-get -y autoremove && ${'\\'}
rm -rf /var/lib/apt/lists/*
# Install Android SDK
ENV ANDROID_SDK_VERSION 4333796
RUN mkdir -p /opt/android-sdk && cd /opt/android-sdk && ${'\\'}
@ -41,7 +45,7 @@
# Install Android NDK & CMake
# This is not required but desirable to reduce the time to download and the chance of download failure.
RUN mkdir -p ~/.android && touch ~/.android/repositories.cfg
RUN $ANDROID_SDK_PATH/tools/bin/sdkmanager 'ndk;25.1.8937393' 'cmake;3.10.2.4988404'
RUN $ANDROID_SDK_PATH/tools/bin/sdkmanager 'ndk;25.1.8937393' 'cmake;3.18.1'
# Install gcloud
RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-407.0.0-linux-x86_64.tar.gz && ${'\\'}

@ -88,7 +88,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/interoptest/grpc_interop_pythonasyncio.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_pythonasyncio@sha256:47127a7863097b436613885a8866a2ef055470452838ceebb31f692ac88ac1d1",
"tools/dockerfile/interoptest/grpc_interop_ruby.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby@sha256:7b044d6848f82234dba81b38d8eca220b608f830f93b42932df59ed6fe20b24d",
"tools/dockerfile/interoptest/lb_interop_fake_servers.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/lb_interop_fake_servers@sha256:b89a51dd9147e1293f50ee64dd719fce5929ca7894d3770a3d80dbdecb99fd52",
"tools/dockerfile/test/android_ndk.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/android_ndk@sha256:bd97f626950e06b0e9ccc790d970e4ce377b5bd408e6ff93045e5e3b061980c9",
"tools/dockerfile/test/android_ndk.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/android_ndk@sha256:64ffc5d1e117172ca4dda89720087616830996181192de25fe10e03a88f0b3e5",
"tools/dockerfile/test/bazel.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel@sha256:d3291d3129469bd4bdd58b5dd81eb6c5668548a4d6e6c8e952fb372d1874b078",
"tools/dockerfile/test/bazel_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel_arm64@sha256:1b7200c85ba8bc10529e1867a27ee81ad303ec8c8efec8bbc5863b4ee8ac6d03",
"tools/dockerfile/test/binder_transport_apk.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/binder_transport_apk@sha256:38c1da5544c717ef0e3d3492833b0fd1ce5c70fbe71eea8a9bfb0ab0b1217f1b",

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/android_ndk:f6f7e406580c74bba4b0d5add0cf74aaaf720058@sha256:bd97f626950e06b0e9ccc790d970e4ce377b5bd408e6ff93045e5e3b061980c9
us-docker.pkg.dev/grpc-testing/testing-images-public/android_ndk:61b1d3a9fbbf58be10bb86f024193c069d126c8c@sha256:64ffc5d1e117172ca4dda89720087616830996181192de25fe10e03a88f0b3e5

@ -96,6 +96,7 @@ RUN apt-get update && apt-get install -y cmake && apt-get clean
RUN mkdir /var/local/jenkins
RUN apt update && apt upgrade -y
# Java required by Android SDK (using Eclipse Temurin Package)
RUN apt install -y wget apt-transport-https && \
@ -104,6 +105,9 @@ RUN apt install -y wget apt-transport-https && \
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
RUN apt update && apt install -y temurin-8-jdk
RUN apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*
# Install Android SDK
ENV ANDROID_SDK_VERSION 4333796
RUN mkdir -p /opt/android-sdk && cd /opt/android-sdk && \
@ -117,7 +121,7 @@ RUN yes | $ANDROID_SDK_PATH/tools/bin/sdkmanager --licenses # accept all licens
# Install Android NDK & CMake
# This is not required but desirable to reduce the time to download and the chance of download failure.
RUN mkdir -p ~/.android && touch ~/.android/repositories.cfg
RUN $ANDROID_SDK_PATH/tools/bin/sdkmanager 'ndk;25.1.8937393' 'cmake;3.10.2.4988404'
RUN $ANDROID_SDK_PATH/tools/bin/sdkmanager 'ndk;25.1.8937393' 'cmake;3.18.1'
# Install gcloud
RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-407.0.0-linux-x86_64.tar.gz && \

Loading…
Cancel
Save