Skip to content

Commit

Permalink
Update Dockerfiles
Browse files Browse the repository at this point in the history
This commit
- updates the Azul JDK version on CentOS 7. This is a temporary workaround that will not work on aarch64
- removes Ubuntu 21.04 and 21.10 since they're EOL and are not used on CI (judging by the downstream pipeline)
- adds support for Ubuntu 22.04
  • Loading branch information
fweikert committed Sep 6, 2022
1 parent be3531f commit 4175e43
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 117 deletions.
16 changes: 4 additions & 12 deletions buildkite/bazelci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 2 additions & 4 deletions buildkite/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion buildkite/docker/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 2 additions & 4 deletions buildkite/docker/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
90 changes: 0 additions & 90 deletions buildkite/docker/ubuntu2104/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions buildkite/startup-docker-pdssd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4175e43

Please sign in to comment.