diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py index e92073210d..fbeddd1e0f 100755 --- a/buildkite/bazelci.py +++ b/buildkite/bazelci.py @@ -550,20 +550,12 @@ "docker-image": f"gcr.io/{DOCKER_REGISTRY_PREFIX}/ubuntu2004-java11-kythe", "python": "python3.8", }, - "ubuntu2104": { - "name": "Ubuntu 21.04 (OpenJDK 11, gcc 10.3.0)", - "emoji-name": ":ubuntu: 21.04 (OpenJDK 11, gcc 10.3.0)", + "ubuntu2204": { + "name": "Ubuntu 22.04 (OpenJDK 17, gcc 11.2.0)", + "emoji-name": ":ubuntu: 22.04 (OpenJDK 17, gcc 11.2.0)", "downstream-root": "/var/lib/buildkite-agent/builds/${BUILDKITE_AGENT_NAME}/${BUILDKITE_ORGANIZATION_SLUG}-downstream-projects", "publish_binary": [], - "docker-image": f"gcr.io/{DOCKER_REGISTRY_PREFIX}/ubuntu2104-java11", - "python": "python3", - }, - "ubuntu2110": { - "name": "Ubuntu 21.10 (OpenJDK 17, gcc 11.2.0)", - "emoji-name": ":ubuntu: 21.10 (OpenJDK 11, gcc 11.2.0)", - "downstream-root": "/var/lib/buildkite-agent/builds/${BUILDKITE_AGENT_NAME}/${BUILDKITE_ORGANIZATION_SLUG}-downstream-projects", - "publish_binary": [], - "docker-image": f"gcr.io/{DOCKER_REGISTRY_PREFIX}/ubuntu2110-java17", + "docker-image": f"gcr.io/{DOCKER_REGISTRY_PREFIX}/ubuntu2204-java17", "python": "python3", }, "macos": { diff --git a/buildkite/docker/build.sh b/buildkite/docker/build.sh index d0ffac4e3e..94e8e39a44 100755 --- a/buildkite/docker/build.sh +++ b/buildkite/docker/build.sh @@ -25,8 +25,7 @@ docker build -f debian11/Dockerfile --target debian11-java17 -t "gcr.io/$PRE docker build -f ubuntu1604/Dockerfile --target ubuntu1604-java8 -t "gcr.io/$PREFIX/ubuntu1604-java8" ubuntu1604 & docker build -f ubuntu1804/Dockerfile --target ubuntu1804-java11 -t "gcr.io/$PREFIX/ubuntu1804-java11" ubuntu1804 & docker build -f ubuntu2004/Dockerfile --target ubuntu2004-java11 -t "gcr.io/$PREFIX/ubuntu2004-java11" ubuntu2004 & -docker build -f ubuntu2104/Dockerfile --target ubuntu2104-java11 -t "gcr.io/$PREFIX/ubuntu2104-java11" ubuntu2104 & -docker build -f ubuntu2110/Dockerfile --target ubuntu2110-java17 -t "gcr.io/$PREFIX/ubuntu2110-java17" ubuntu2110 & +docker build -f ubuntu2204/Dockerfile --target ubuntu2204-java17 -t "gcr.io/$PREFIX/ubuntu2204-java17" ubuntu2204 & wait docker build -f centos7/Dockerfile --target centos7-java8 -t "gcr.io/$PREFIX/centos7-java8" centos7 @@ -37,5 +36,4 @@ docker build -f ubuntu1604/Dockerfile --target ubuntu1604-bazel-java8 -t "g docker build -f ubuntu1804/Dockerfile --target ubuntu1804-bazel-java11 -t "gcr.io/$PREFIX/ubuntu1804-bazel-java11" ubuntu1804 docker build -f ubuntu2004/Dockerfile --target ubuntu2004-bazel-java11 -t "gcr.io/$PREFIX/ubuntu2004-bazel-java11" ubuntu2004 docker build -f ubuntu2004/Dockerfile --target ubuntu2004-java11-kythe -t "gcr.io/$PREFIX/ubuntu2004-java11-kythe" ubuntu2004 -docker build -f ubuntu2104/Dockerfile --target ubuntu2104-bazel-java11 -t "gcr.io/$PREFIX/ubuntu2104-bazel-java11" ubuntu2104 -docker build -f ubuntu2110/Dockerfile --target ubuntu2110-bazel-java17 -t "gcr.io/$PREFIX/ubuntu2110-bazel-java17" ubuntu2110 +docker build -f ubuntu2204/Dockerfile --target ubuntu2204-bazel-java17 -t "gcr.io/$PREFIX/ubuntu2204-bazel-java17" ubuntu2204 diff --git a/buildkite/docker/centos7/Dockerfile b/buildkite/docker/centos7/Dockerfile index 169cfd567f..6dc12a1060 100644 --- a/buildkite/docker/centos7/Dockerfile +++ b/buildkite/docker/centos7/Dockerfile @@ -66,7 +66,7 @@ FROM centos7 AS centos7-java11 # Unfortunately Azul doesn't publish an RPM package for zulu11 on aarch64, so we have to use the tar.gz version. RUN mkdir -p /usr/lib/jvm/zulu-11 && \ pushd /usr/lib/jvm/zulu-11 && \ - curl "https://cdn.azul.com/zulu-embedded/bin/zulu11.52.13-ca-jdk11.0.13-linux_$(uname -m).tar.gz" | tar xvz --strip-components=1 && \ + curl "https://cdn.azul.com/zulu/bin/zulu11.58.23-ca-jdk11.0.16.1-linux_x64.tar.gz" | tar xvz --strip-components=1 && \ update-alternatives \ --install /usr/bin/java java /usr/lib/jvm/zulu-11/bin/java 2115200 \ --slave /usr/bin/jaotc jaotc /usr/lib/jvm/zulu-11/bin/jaotc \ diff --git a/buildkite/docker/push.sh b/buildkite/docker/push.sh index 048e067b72..686f00e583 100755 --- a/buildkite/docker/push.sh +++ b/buildkite/docker/push.sh @@ -28,8 +28,6 @@ docker push "gcr.io/$PREFIX/ubuntu1804-java11" & docker push "gcr.io/$PREFIX/ubuntu2004-bazel-java11" & docker push "gcr.io/$PREFIX/ubuntu2004-java11" & docker push "gcr.io/$PREFIX/ubuntu2004-java11-kythe" & -docker push "gcr.io/$PREFIX/ubuntu2104-java11" & -docker push "gcr.io/$PREFIX/ubuntu2104-bazel-java11" & -docker push "gcr.io/$PREFIX/ubuntu2110-java17" & -docker push "gcr.io/$PREFIX/ubuntu2110-bazel-java17" & +docker push "gcr.io/$PREFIX/ubuntu2204-java17" & +docker push "gcr.io/$PREFIX/ubuntu2204-bazel-java17" & wait diff --git a/buildkite/docker/ubuntu2104/Dockerfile b/buildkite/docker/ubuntu2104/Dockerfile deleted file mode 100644 index a164d5d25e..0000000000 --- a/buildkite/docker/ubuntu2104/Dockerfile +++ /dev/null @@ -1,90 +0,0 @@ -FROM ubuntu:21.04 as ubuntu2104-bazel-java11 -ARG BUILDARCH - -ENV DEBIAN_FRONTEND="noninteractive" -ENV LANG "C.UTF-8" -ENV LANGUAGE "C.UTF-8" -ENV LC_ALL "C.UTF-8" - -### Install packages required by Bazel and its tests -RUN apt-get -y update && \ - apt-get -y install --no-install-recommends \ - apt-utils \ - bind9-host \ - build-essential \ - clang \ - coreutils \ - curl \ - dnsutils \ - ed \ - expect \ - file \ - git \ - gnupg2 \ - iproute2 \ - iputils-ping \ - lcov \ - less \ - libc++-dev \ - libncurses5 \ - libssl-dev \ - llvm \ - llvm-dev \ - lsb-release \ - netcat-openbsd \ - openjdk-11-jdk-headless \ - python-is-python3 \ - python2 \ - python2-dev \ - python3 \ - python3-dev \ - python3-pip \ - python3-requests \ - python3-setuptools \ - python3-six \ - python3-wheel \ - python3-yaml \ - software-properties-common \ - sudo \ - unzip \ - wget \ - zip \ - zlib1g-dev \ - && \ - apt-get -y purge apport && \ - rm -rf /var/lib/apt/lists/* - -# Allow using sudo inside the container. -RUN echo "ALL ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers - -ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-${BUILDARCH} - -FROM ubuntu2104-bazel-java11 AS ubuntu2104-java11 - -### Install Google Cloud SDK. -### https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu -RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ - curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \ - apt-get update -y && apt-get install google-cloud-sdk -y && \ - rm -rf /var/lib/apt/lists/* - -### Docker (for legacy rbe_autoconfig) -RUN apt-get -y update && \ - apt-get -y install apt-transport-https ca-certificates && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ - add-apt-repository "deb [arch=$BUILDARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \ - apt-get -y update && \ - apt-get -y install docker-ce && \ - rm -rf /var/lib/apt/lists/* - -# Bazelisk -RUN LATEST_BAZELISK=$(curl -sSI https://github.com/bazelbuild/bazelisk/releases/latest | grep -i '^location: ' | sed 's|.*/||' | sed $'s/\r//') && \ - curl -Lo /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/${LATEST_BAZELISK}/bazelisk-linux-${BUILDARCH} && \ - chown root:root /usr/local/bin/bazel && \ - chmod 0755 /usr/local/bin/bazel - -# Buildifier -RUN LATEST_BUILDIFIER=$(curl -sSI https://github.com/bazelbuild/buildtools/releases/latest | grep -i '^location: ' | sed 's|.*/||' | sed $'s/\r//') && \ - curl -Lo /usr/local/bin/buildifier https://github.com/bazelbuild/buildtools/releases/download/${LATEST_BUILDIFIER}/buildifier-linux-${BUILDARCH} && \ - chown root:root /usr/local/bin/buildifier && \ - chmod 0755 /usr/local/bin/buildifier diff --git a/buildkite/docker/ubuntu2110/Dockerfile b/buildkite/docker/ubuntu2204/Dockerfile similarity index 96% rename from buildkite/docker/ubuntu2110/Dockerfile rename to buildkite/docker/ubuntu2204/Dockerfile index cfc7e89c5c..6b98beb546 100644 --- a/buildkite/docker/ubuntu2110/Dockerfile +++ b/buildkite/docker/ubuntu2204/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:21.10 as ubuntu2110-bazel-java17 +FROM ubuntu:22.04 as ubuntu2204-bazel-java17 ARG BUILDARCH ENV DEBIAN_FRONTEND="noninteractive" @@ -59,7 +59,7 @@ RUN echo "ALL ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-${BUILDARCH} -FROM ubuntu2110-bazel-java17 AS ubuntu2110-java17 +FROM ubuntu2204-bazel-java17 AS ubuntu2204-java17 ### Install Google Cloud SDK. ### https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu diff --git a/buildkite/startup-docker-pdssd.sh b/buildkite/startup-docker-pdssd.sh index dc3fd4991c..c0c1dd9fab 100644 --- a/buildkite/startup-docker-pdssd.sh +++ b/buildkite/startup-docker-pdssd.sh @@ -108,10 +108,8 @@ docker pull "gcr.io/$PREFIX/ubuntu1804-java11" & docker pull "gcr.io/$PREFIX/ubuntu2004-bazel-java11" & docker pull "gcr.io/$PREFIX/ubuntu2004-java11" & docker pull "gcr.io/$PREFIX/ubuntu2004-java11-kythe" & -docker pull "gcr.io/$PREFIX/ubuntu2104-java11" & -docker pull "gcr.io/$PREFIX/ubuntu2104-bazel-java11" & -docker pull "gcr.io/$PREFIX/ubuntu2110-java17" & -docker pull "gcr.io/$PREFIX/ubuntu2110-bazel-java17" & +docker pull "gcr.io/$PREFIX/ubuntu2204-java17" & +docker pull "gcr.io/$PREFIX/ubuntu2204-bazel-java17" & wait ### Start the Buildkite agent service.