Skip to content

Commit fba4b34

Browse files
authored
ci(v3): retire ubuntu focal (#15954)
1 parent f9ab37a commit fba4b34

File tree

12 files changed

+211
-306
lines changed

12 files changed

+211
-306
lines changed
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM ubuntu:22.04
16+
17+
ENV DEBIAN_FRONTEND=noninteractive
18+
RUN apt-get update && \
19+
apt-get --no-install-recommends install -y \
20+
automake \
21+
build-essential \
22+
clang \
23+
cmake \
24+
curl \
25+
gawk \
26+
git \
27+
gcc \
28+
g++ \
29+
libcurl4-openssl-dev \
30+
libssl-dev \
31+
libtool \
32+
lsb-release \
33+
make \
34+
ninja-build \
35+
patch \
36+
pkg-config \
37+
python3 \
38+
python3-dev \
39+
python3-pip \
40+
tar \
41+
unzip \
42+
zip \
43+
wget \
44+
zlib1g-dev \
45+
apt-utils \
46+
ca-certificates \
47+
apt-transport-https
48+
49+
# Install Python packages used in the integration tests.
50+
RUN update-alternatives --install /usr/bin/python python $(which python3) 10
51+
RUN pip3 install setuptools wheel
52+
# The Cloud Pub/Sub emulator needs Java :shrug:
53+
RUN apt update && apt install -y openjdk-11-jre
54+
55+
# Install all the direct (and indirect) dependencies for google-cloud-cpp.
56+
# Use a different directory for each build, and remove the downloaded
57+
# files and any temporary artifacts after a successful build to keep the
58+
# image smaller (and with fewer layers)
59+
60+
WORKDIR /var/tmp/build/abseil-cpp
61+
RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \
62+
tar -xzf - --strip-components=1 && \
63+
cmake \
64+
-DCMAKE_BUILD_TYPE="Release" \
65+
-DCMAKE_CXX_STANDARD=17 \
66+
-DABSL_BUILD_TESTING=OFF \
67+
-DBUILD_SHARED_LIBS=yes \
68+
-S . -B cmake-out -GNinja && \
69+
cmake --build cmake-out --target install && \
70+
ldconfig && \
71+
cd /var/tmp && rm -fr build
72+
73+
WORKDIR /var/tmp/build/googletest
74+
RUN curl -fsSL https://github.com/google/googletest/archive/v1.16.0.tar.gz | \
75+
tar -xzf - --strip-components=1 && \
76+
cmake \
77+
-DCMAKE_BUILD_TYPE="Release" \
78+
-DCMAKE_CXX_STANDARD=17 \
79+
-DBUILD_SHARED_LIBS=yes \
80+
-S . -B cmake-out -GNinja && \
81+
cmake --build cmake-out --target install && \
82+
ldconfig && \
83+
cd /var/tmp && rm -fr build
84+
85+
WORKDIR /var/tmp/build/benchmark
86+
RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \
87+
tar -xzf - --strip-components=1 && \
88+
cmake \
89+
-DCMAKE_BUILD_TYPE="Release" \
90+
-DBUILD_SHARED_LIBS=yes \
91+
-DBENCHMARK_ENABLE_TESTING=OFF \
92+
-S . -B cmake-out -GNinja && \
93+
cmake --build cmake-out --target install && \
94+
ldconfig && \
95+
cd /var/tmp && rm -fr build
96+
97+
WORKDIR /var/tmp/build/nlohmann-json
98+
RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \
99+
tar -xzf - --strip-components=1 && \
100+
cmake \
101+
-DCMAKE_BUILD_TYPE="Release" \
102+
-DBUILD_SHARED_LIBS=yes \
103+
-DBUILD_TESTING=OFF \
104+
-DJSON_BuildTests=OFF \
105+
-S . -B cmake-out -GNinja && \
106+
cmake --build cmake-out --target install && \
107+
ldconfig && \
108+
cd /var/tmp && rm -fr build
109+
110+
111+
WORKDIR /var/tmp/build/protobuf
112+
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \
113+
tar -xzf - --strip-components=1 && \
114+
cmake \
115+
-DCMAKE_BUILD_TYPE=Release \
116+
-DCMAKE_CXX_STANDARD=17 \
117+
-DBUILD_SHARED_LIBS=yes \
118+
-Dprotobuf_BUILD_TESTS=OFF \
119+
-Dprotobuf_ABSL_PROVIDER=package \
120+
-S . -B cmake-out -GNinja && \
121+
cmake --build cmake-out --target install && \
122+
ldconfig && \
123+
cd /var/tmp && rm -fr build
124+
125+
WORKDIR /var/tmp/build/c-ares
126+
RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \
127+
tar -xzf - --strip-components=1 && \
128+
cmake \
129+
-DCMAKE_BUILD_TYPE=Release \
130+
-DBUILD_SHARED_LIBS=yes \
131+
-S . -B cmake-out -GNinja && \
132+
cmake --build cmake-out --target install && \
133+
ldconfig && \
134+
cd /var/tmp && rm -fr build
135+
136+
WORKDIR /var/tmp/build/re2
137+
RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \
138+
tar -xzf - --strip-components=1 && \
139+
cmake -DCMAKE_BUILD_TYPE=Release \
140+
-DBUILD_SHARED_LIBS=ON \
141+
-DRE2_BUILD_TESTING=OFF \
142+
-S . -B cmake-out -GNinja && \
143+
cmake --build cmake-out --target install && \
144+
ldconfig && \
145+
cd /var/tmp && rm -fr build
146+
147+
WORKDIR /var/tmp/build/
148+
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
149+
tar -xzf - --strip-components=1 && \
150+
cmake \
151+
-DCMAKE_CXX_STANDARD=17 \
152+
-DCMAKE_BUILD_TYPE=Release \
153+
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
154+
-DBUILD_SHARED_LIBS=ON \
155+
-DWITH_EXAMPLES=OFF \
156+
-DWITH_STL=CXX17 \
157+
-DBUILD_TESTING=OFF \
158+
-DOPENTELEMETRY_INSTALL=ON \
159+
-DOPENTELEMETRY_ABI_VERSION_NO=2 \
160+
-S . -B cmake-out -GNinja && \
161+
cmake --build cmake-out --target install && \
162+
ldconfig && cd /var/tmp && rm -fr build
163+
164+
WORKDIR /var/tmp/build/grpc
165+
RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \
166+
tar -xzf - --strip-components=1 && \
167+
cmake \
168+
-DCMAKE_BUILD_TYPE=Release \
169+
-DCMAKE_CXX_STANDARD=17 \
170+
-DBUILD_SHARED_LIBS=ON \
171+
-DgRPC_INSTALL=ON \
172+
-DgRPC_BUILD_TESTS=OFF \
173+
-DgRPC_ABSL_PROVIDER=package \
174+
-DgRPC_CARES_PROVIDER=package \
175+
-DgRPC_PROTOBUF_PROVIDER=package \
176+
-DgRPC_RE2_PROVIDER=package \
177+
-DgRPC_SSL_PROVIDER=package \
178+
-DgRPC_ZLIB_PROVIDER=package \
179+
-DgRPC_OPENTELEMETRY_PROVIDER=package \
180+
-DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON \
181+
-S . -B cmake-out -GNinja && \
182+
cmake --build cmake-out --target install && \
183+
ldconfig && \
184+
cd /var/tmp && rm -fr build
185+
186+
# Install the Cloud SDK and some of the emulators. We use the emulators to run
187+
# integration tests for the client libraries.
188+
COPY . /var/tmp/ci
189+
WORKDIR /var/tmp/downloads
190+
RUN /var/tmp/ci/install-cloud-sdk.sh
191+
ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk
192+
ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH}
193+
194+
WORKDIR /var/tmp/sccache
195+
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \
196+
tar -zxf - --strip-components=1 && \
197+
mkdir -p /usr/local/bin && \
198+
mv sccache /usr/local/bin/sccache && \
199+
chmod +x /usr/local/bin/sccache
200+
201+
# Update the ld.conf cache in case any libraries were installed in /usr/local/lib*
202+
RUN ldconfig /usr/local/lib*

ci/cloudbuild/dockerfiles/ubuntu-22.04.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 Google LLC
1+
# Copyright 2026 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

ci/cloudbuild/dockerfiles/ubuntu-focal.Dockerfile

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ github:
1919
push:
2020
branch: prepare-for-v3.0.0
2121
includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS
22-
name: prepare-for-v3-0-0-clang-7-0-ci
22+
name: prepare-for-v3-0-0-clang-14-0-ci
2323
substitutions:
24-
_BUILD_NAME: clang-7.0
25-
_DISTRO: ubuntu-20.04-install
24+
_BUILD_NAME: clang-14.0
25+
_DISTRO: ubuntu-22.04-install
2626
_TRIGGER_TYPE: ci
2727
tags:
2828
- ci
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ github:
2020
branch: prepare-for-v3.0.0
2121
commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY
2222
includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS
23-
name: prepare-for-v3-0-0-clang-7-0-pr
23+
name: prepare-for-v3-0-0-clang-14-0-pr
2424
substitutions:
25-
_BUILD_NAME: clang-7.0
26-
_DISTRO: ubuntu-20.04-install
25+
_BUILD_NAME: clang-14.0
26+
_DISTRO: ubuntu-22.04-install
2727
_TRIGGER_TYPE: pr
2828
tags:
2929
- pr

ci/cloudbuild/triggers/demo-ubuntu-focal-ci.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

ci/cloudbuild/triggers/demo-ubuntu-focal-pr.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

ci/cloudbuild/triggers/quickstart-cmake-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS
2222
name: prepare-for-v3-0-0-quickstart-cmake-ci
2323
substitutions:
2424
_BUILD_NAME: quickstart-cmake
25-
_DISTRO: ubuntu-focal
25+
_DISTRO: ubuntu-22.04
2626
_TRIGGER_TYPE: ci
2727
tags:
2828
- ci

ci/cloudbuild/triggers/quickstart-cmake-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS
2323
name: prepare-for-v3-0-0-quickstart-cmake-pr
2424
substitutions:
2525
_BUILD_NAME: quickstart-cmake
26-
_DISTRO: ubuntu-focal
26+
_DISTRO: ubuntu-22.04
2727
_TRIGGER_TYPE: pr
2828
tags:
2929
- pr

0 commit comments

Comments
 (0)