Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Commit 2d06ffc

Browse files
authored
ci: more fixes for ci/kokoro/readme (#95)
These are some final tweaks: * Add the "automatically generated warnings" * Refactor the `FROM devtools AS readme` line * Place `ARG NCPU=...` in the right places
1 parent 8941b0e commit 2d06ffc

24 files changed

+138
-180
lines changed

ci/kokoro/readme/Dockerfile.centos-7

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=7
1622
FROM centos:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
18-
19-
# Please keep the formatting in these commands, it is optimized to cut & paste
20-
# into the README.md file.
2123

2224
## [START README.md]
2325

24-
# First install the development tools and OpenSSL.
25-
# The development tools distributed with CentOS (notably CMake) are too old to
26-
# build `google-cloud-cpp-common`. In these instructions, we use `cmake3`
27-
# obtained from [Software Collections](https://www.softwarecollections.org/).
26+
# Install the development tools and OpenSSL. The development tools distributed
27+
# with CentOS (notably CMake) are too old to build the
28+
# `google-cloud-cpp-common` project. We recommend you install cmake3 from
29+
# [Software Collections](https://www.softwarecollections.org/).
2830

2931
# ```bash
3032
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
@@ -36,18 +38,13 @@ RUN yum makecache && \
3638
RUN ln -sf /usr/bin/cmake3 /usr/bin/cmake && ln -sf /usr/bin/ctest3 /usr/bin/ctest
3739
# ```
3840

41+
## [END README.md]
42+
3943
FROM devtools AS readme
4044
ARG NCPU=4
4145

42-
## [START IGNORED]
43-
# Verify that the tools above are enough to compile google-cloud-cpp-common
44-
# when using the super build.
4546
WORKDIR /home/build/super
4647
COPY . /home/build/super
4748
RUN cmake -Hsuper -Bcmake-out \
4849
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
49-
RUN cmake --build cmake-out -- -j ${NCPU}
50-
# The tests will already be run as part of the build, no need to run it again.
51-
## [END IGNORED]
52-
53-
## [END README.md]
50+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.centos-8

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=8
1622
FROM centos:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
18-
19-
# Please keep the formatting in these commands, it is optimized to cut & paste
20-
# into the README.md file.
2123

2224
## [START README.md]
2325

@@ -29,18 +31,13 @@ RUN dnf makecache && \
2931
zlib-devel
3032
# ```
3133

34+
## [END README.md]
35+
3236
FROM devtools AS readme
3337
ARG NCPU=4
3438

35-
## [START IGNORED]
36-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
37-
# the super build.
3839
WORKDIR /home/build/super
3940
COPY . /home/build/super
4041
RUN cmake -Hsuper -Bcmake-out \
4142
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
42-
RUN cmake --build cmake-out -- -j ${NCPU}
43-
# The tests will already be run as part of the build, no need to run it again.
44-
## [END IGNORED]
45-
46-
## [END README.md]
43+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.debian-buster

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=buster
1622
FROM debian:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
18-
19-
# Please keep the formatting in these commands, it is optimized to cut & paste
20-
# into the README.md file.
2123

2224
## [START README.md]
2325

@@ -30,18 +32,13 @@ RUN apt update && \
3032
pkg-config tar wget zlib1g-dev
3133
# ```
3234

35+
## [END README.md]
36+
3337
FROM devtools AS readme
3438
ARG NCPU=4
3539

36-
## [START IGNORED]
37-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
38-
# the super build.
3940
WORKDIR /home/build/super
4041
COPY . /home/build/super
4142
RUN cmake -Hsuper -Bcmake-out \
4243
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
43-
RUN cmake --build cmake-out -- -j ${NCPU}
44-
# The tests will already be run as part of the build, no need to run it again.
45-
## [END IGNORED]
46-
47-
## [END README.md]
44+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.debian-stretch

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=stretch
1622
FROM debian:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
18-
19-
# Please keep the formatting in these commands, it is optimized to cut & paste
20-
# into the README.md file.
2123

2224
## [START README.md]
2325

@@ -30,18 +32,13 @@ RUN apt update && \
3032
pkg-config tar wget zlib1g-dev
3133
# ```
3234

35+
## [END README.md]
36+
3337
FROM devtools AS readme
3438
ARG NCPU=4
3539

36-
## [START IGNORED]
37-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
38-
# the super build.
3940
WORKDIR /home/build/super
4041
COPY . /home/build/super
4142
RUN cmake -Hsuper -Bcmake-out \
4243
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
43-
RUN cmake --build cmake-out -- -j ${NCPU}
44-
# The tests will already be run as part of the build, no need to run it again.
45-
## [END IGNORED]
46-
47-
## [END README.md]
44+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.fedora

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=30
1622
FROM fedora:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
18-
19-
# Please keep the formatting below, it is used by `extract-readme.sh` and
20-
# `extract-install.md` to generate the contents of the top-level README.md and
21-
# INSTALL.md files.
2223

2324
## [START README.md]
2425

@@ -30,18 +31,13 @@ RUN dnf makecache && \
3031
zlib-devel
3132
# ```
3233

34+
## [END README.md]
35+
3336
FROM devtools AS readme
3437
ARG NCPU=4
3538

36-
## [START IGNORED]
37-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
38-
# the super build.
3939
WORKDIR /home/build/super
4040
COPY . /home/build/super
4141
RUN cmake -Hsuper -Bcmake-out \
4242
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
43-
RUN cmake --build cmake-out -- -j ${NCPU}
44-
# The tests will already be run as part of the build, no need to run it again.
45-
## [END IGNORED]
46-
47-
## [END README.md]
43+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.opensuse-leap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=latest
1622
FROM opensuse/leap:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
1823

1924
## [START README.md]
2025

@@ -26,18 +31,13 @@ RUN zypper refresh && \
2631
libcurl-devel libopenssl-devel make tar wget
2732
# ```
2833

34+
## [END README.md]
35+
2936
FROM devtools AS readme
3037
ARG NCPU=4
3138

32-
## [START IGNORED]
33-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
34-
# the super build.
3539
WORKDIR /home/build/super
3640
COPY . /home/build/super
3741
RUN cmake -Hsuper -Bcmake-out \
3842
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
39-
RUN cmake --build cmake-out -- -j ${NCPU}
40-
# The tests will already be run as part of the build, no need to run it again.
41-
## [END IGNORED]
42-
43-
## [END README.md]
43+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.opensuse-tumbleweed

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=latest
1622
FROM opensuse/tumbleweed:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
1823

1924
## [START README.md]
2025

@@ -26,18 +31,13 @@ RUN zypper refresh && \
2631
libcurl-devel libopenssl-devel make tar wget zlib-devel
2732
# ```
2833

29-
FROM devtools AS README
34+
## [END README.md]
35+
36+
FROM devtools AS readme
3037
ARG NCPU=4
3138

32-
## [START IGNORED]
33-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
34-
# the super build.
3539
WORKDIR /home/build/super
3640
COPY . /home/build/super
3741
RUN cmake -Hsuper -Bcmake-out \
3842
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
39-
RUN cmake --build cmake-out -- -j ${NCPU}
40-
# The tests will already be run as part of the build, no need to run it again.
41-
## [END IGNORED]
42-
43-
## [END README.md]
43+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.ubuntu-bionic

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=bionic
1622
FROM ubuntu:${DISTRO_VERSION} AS devtools
17-
ARG NCPU=4
18-
19-
# Please keep the formatting in these commands, it is optimized to cut & paste
20-
# into the README.md file.
2123

2224
## [START README.md]
2325

@@ -30,18 +32,13 @@ RUN apt update && \
3032
pkg-config tar wget zlib1g-dev
3133
# ```
3234

35+
## [END README.md]
36+
3337
FROM devtools AS readme
3438
ARG NCPU=4
3539

36-
## [START IGNORED]
37-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
38-
# the super build.
3940
WORKDIR /home/build/super
4041
COPY . /home/build/super
4142
RUN cmake -Hsuper -Bcmake-out \
4243
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
43-
RUN cmake --build cmake-out -- -j ${NCPU}
44-
# The tests will already be run as part of the build, no need to run it again.
45-
## [END IGNORED]
46-
47-
## [END README.md]
44+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

ci/kokoro/readme/Dockerfile.ubuntu-trusty

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
#
16+
# WARNING: This is an automatically generated file. Consider changing the
17+
# sources instead. You can find the source templates and scripts at:
18+
# https://github.com/googleapis/google-cloud-cpp-common/ci/templates
19+
#
20+
1521
ARG DISTRO_VERSION=trusty
1622
FROM ubuntu:${DISTRO_VERSION} AS devtools
1723
ARG NCPU=4
1824

19-
# Please keep the formatting below, it is used by `extract-readme.sh` and
20-
# `extract-install.md` to generate the contents of the top-level README.md and
21-
# INSTALL.md files.
22-
2325
## [START README.md]
2426

2527
# Install the minimal development tools.
@@ -62,18 +64,13 @@ ENV OPENSSL_ROOT_DIR=/usr/local/ssl
6264
ENV PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig
6365
# ```
6466

67+
## [END README.md]
68+
6569
FROM devtools AS readme
6670
ARG NCPU=4
6771

68-
## [START IGNORED]
69-
# Verify that the tools above are enough to compile google-cloud-cpp-common when using
70-
# the super build.
7172
WORKDIR /home/build/super
7273
COPY . /home/build/super
7374
RUN cmake -Hsuper -Bcmake-out \
7475
-DGOOGLE_CLOUD_CPP_EXTERNAL_PREFIX=$HOME/local
75-
RUN cmake --build cmake-out -- -j ${NCPU}
76-
# The tests will already be run as part of the build, no need to run it again.
77-
## [END IGNORED]
78-
79-
## [END README.md]
76+
RUN cmake --build cmake-out -- -j ${NCPU:-4}

0 commit comments

Comments
 (0)