Skip to content

Commit 2710708

Browse files
authored
Merge pull request #1491 from Altinity/cicd-fixes-25.3.8-fips
25.3.8 fips - Packaging and cicd fixes
2 parents 2d08ac1 + 5d29017 commit 2710708

File tree

14 files changed

+23
-104
lines changed

14 files changed

+23
-104
lines changed

docker/keeper/Dockerfile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ RUN arch=${TARGETARCH:-amd64} \
3535
arm64) ln -sf /lib/ld-2.35.so /lib/ld-linux-aarch64.so.1 ;; \
3636
esac
3737

38-
# lts / testing / prestable / etc
39-
ARG REPO_CHANNEL="stable"
40-
ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}"
41-
ARG VERSION="25.2.2.39"
42-
ARG PACKAGES="clickhouse-keeper"
38+
# NOTE (strtgbb): Removed install methods other than direct URL install to tidy the Dockerfile
39+
4340
ARG DIRECT_DOWNLOAD_URLS=""
4441

4542
# user/group precreated explicitly with fixed uid/gid on purpose.
@@ -63,12 +60,7 @@ RUN arch=${TARGETARCH:-amd64} \
6360
&& wget -c -q "$url" \
6461
; done \
6562
else \
66-
for package in ${PACKAGES}; do \
67-
cd /tmp \
68-
&& echo "Get ${REPOSITORY}/${package}-${VERSION}-${arch}.tgz" \
69-
&& wget -c -q "${REPOSITORY}/${package}-${VERSION}-${arch}.tgz" \
70-
&& wget -c -q "${REPOSITORY}/${package}-${VERSION}-${arch}.tgz.sha512" \
71-
; done \
63+
exit 1; \
7264
fi \
7365
&& cat *.tgz.sha512 | sha512sum -c \
7466
&& for file in *.tgz; do \

docker/server/Dockerfile.alpine

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ RUN arch=${TARGETARCH:-amd64} \
3232
arm64) ln -sf /lib/ld-2.35.so /lib/ld-linux-aarch64.so.1 ;; \
3333
esac
3434

35-
# lts / testing / prestable / etc
36-
ARG REPO_CHANNEL="stable"
37-
ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}"
38-
ARG VERSION="25.2.2.39"
39-
ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static"
35+
36+
37+
# NOTE (strtgbb): Removed install methods other than direct URL install to tidy the Dockerfile
38+
4039
ARG DIRECT_DOWNLOAD_URLS=""
4140

4241
# user/group precreated explicitly with fixed uid/gid on purpose.
@@ -59,11 +58,7 @@ RUN arch=${TARGETARCH:-amd64} \
5958
&& wget -c -q "$url" \
6059
; done \
6160
else \
62-
for package in ${PACKAGES}; do \
63-
echo "Get ${REPOSITORY}/${package}-${VERSION}-${arch}.tgz" \
64-
&& wget -c -q "${REPOSITORY}/${package}-${VERSION}-${arch}.tgz" \
65-
&& wget -c -q "${REPOSITORY}/${package}-${VERSION}-${arch}.tgz.sha512" \
66-
; done \
61+
exit 1; \
6762
fi \
6863
&& cat *.tgz.sha512 | sed 's:/output/:/tmp/:' | sha512sum -c \
6964
&& for file in *.tgz; do \

docker/server/Dockerfile.ubuntu

Lines changed: 3 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,12 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list
2626
wget \
2727
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
2828

29-
ARG REPO_CHANNEL="stable"
30-
ARG REPOSITORY="deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb ${REPO_CHANNEL} main"
31-
ARG VERSION="25.2.2.39"
32-
ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static"
33-
3429
#docker-official-library:off
3530
# The part between `docker-official-library` tags is related to our builds
3631

37-
# set non-empty deb_location_url url to create a docker image
38-
# from debs created by CI build, for example:
39-
# docker build . --network host --build-arg version="21.4.1.6282" --build-arg deb_location_url="https://..." -t ...
40-
ARG deb_location_url=""
41-
ARG DIRECT_DOWNLOAD_URLS=""
32+
# NOTE (strtgbb): Removed install methods other than direct URL install to tidy the Dockerfile
4233

43-
# set non-empty single_binary_location_url to create docker image
44-
# from a single binary url (useful for non-standard builds - with sanitizers, for arm64).
45-
ARG single_binary_location_url=""
34+
ARG DIRECT_DOWNLOAD_URLS=""
4635

4736
ARG TARGETARCH
4837

@@ -58,64 +47,7 @@ RUN if [ -n "${DIRECT_DOWNLOAD_URLS}" ]; then \
5847
&& rm -rf /tmp/* ; \
5948
fi
6049

61-
# install from a web location with deb packages
62-
RUN arch="${TARGETARCH:-amd64}" \
63-
&& if [ -n "${deb_location_url}" ]; then \
64-
echo "installing from custom url with deb packages: ${deb_location_url}" \
65-
&& rm -rf /tmp/clickhouse_debs \
66-
&& mkdir -p /tmp/clickhouse_debs \
67-
&& for package in ${PACKAGES}; do \
68-
{ wget --progress=bar:force:noscroll "${deb_location_url}/${package}_${VERSION}_${arch}.deb" -P /tmp/clickhouse_debs || \
69-
wget --progress=bar:force:noscroll "${deb_location_url}/${package}_${VERSION}_all.deb" -P /tmp/clickhouse_debs ; } \
70-
|| exit 1 \
71-
; done \
72-
&& dpkg -i /tmp/clickhouse_debs/*.deb \
73-
&& rm -rf /tmp/* ; \
74-
fi
75-
76-
# install from a single binary
77-
RUN if [ -n "${single_binary_location_url}" ]; then \
78-
echo "installing from single binary url: ${single_binary_location_url}" \
79-
&& rm -rf /tmp/clickhouse_binary \
80-
&& mkdir -p /tmp/clickhouse_binary \
81-
&& wget --progress=bar:force:noscroll "${single_binary_location_url}" -O /tmp/clickhouse_binary/clickhouse \
82-
&& chmod +x /tmp/clickhouse_binary/clickhouse \
83-
&& /tmp/clickhouse_binary/clickhouse install --user "clickhouse" --group "clickhouse" \
84-
&& rm -rf /tmp/* ; \
85-
fi
86-
87-
# The rest is the same in the official docker and in our build system
88-
#docker-official-library:on
89-
90-
# A fallback to installation from ClickHouse repository
91-
# It works unless the clickhouse binary already exists
92-
RUN clickhouse local -q 'SELECT 1' >/dev/null 2>&1 && exit 0 || : \
93-
; apt-get update \
94-
&& apt-get install --yes --no-install-recommends \
95-
dirmngr \
96-
gnupg2 \
97-
&& mkdir -p /etc/apt/sources.list.d \
98-
&& GNUPGHOME=$(mktemp -d) \
99-
&& GNUPGHOME="$GNUPGHOME" gpg --batch --no-default-keyring \
100-
--keyring /usr/share/keyrings/clickhouse-keyring.gpg \
101-
--keyserver hkp://keyserver.ubuntu.com:80 \
102-
--recv-keys 3a9ea1193a97b548be1457d48919f6bd2b48d754 \
103-
&& rm -rf "$GNUPGHOME" \
104-
&& chmod +r /usr/share/keyrings/clickhouse-keyring.gpg \
105-
&& echo "${REPOSITORY}" > /etc/apt/sources.list.d/clickhouse.list \
106-
&& echo "installing from repository: ${REPOSITORY}" \
107-
&& apt-get update \
108-
&& for package in ${PACKAGES}; do \
109-
packages="${packages} ${package}=${VERSION}" \
110-
; done \
111-
&& apt-get install --yes --no-install-recommends ${packages} || exit 1 \
112-
&& rm -rf \
113-
/var/lib/apt/lists/* \
114-
/var/cache/debconf \
115-
/tmp/* \
116-
&& apt-get autoremove --purge -yq dirmngr gnupg2 \
117-
&& chmod ugo+Xrw -R /etc/clickhouse-server /etc/clickhouse-client
118-
# The last chmod is here to make the next one is No-op in docker official library Dockerfile
50+
# NOTE (strtgbb): Removed install methods other than direct URL install to tidy the Dockerfile
11951

12052
# post install
12153
# we need to allow "others" access to clickhouse folder, because docker container

programs/server/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@
16871687
<anonymize>false</anonymize>
16881688
<!-- Default endpoint should be changed to different Sentry DSN only if you have -->
16891689
<!-- some in-house engineers or hired consultants who're going to debug ClickHouse issues for you -->
1690-
<endpoint>https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277</endpoint>
1690+
<endpoint></endpoint>
16911691
<!-- Send LOGICAL_ERRORs as well (default: false) -->
16921692
<send_logical_errors>false</send_logical_errors>
16931693
</send_crash_reports>

programs/server/config.yaml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,6 @@ send_crash_reports:
939939
anonymize: false
940940
# Default endpoint should be changed to different Sentry DSN only if you have
941941
# some in-house engineers or hired consultants who're going to debug ClickHouse issues for you
942-
endpoint: 'https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277'
942+
endpoint: ''
943943
# Uncomment to disable ClickHouse internal DNS caching.
944944
# disable_internal_dns_cache: 1

tests/ci/docker_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ def buildx_args(
184184
args = [
185185
f"--platform=linux/{arch}",
186186
f"--label=build-url={GITHUB_RUN_URL}",
187-
f"--label=com.clickhouse.build.githash={git.sha}",
188-
f"--label=com.clickhouse.build.version={version}",
187+
f"--label=com.altinity.build.githash={git.sha}",
188+
f"--label=com.altinity.build.version={version}",
189189
]
190190
if direct_urls:
191191
args.append(f"--build-arg=DIRECT_DOWNLOAD_URLS='{' '.join(direct_urls)}'")

tests/integration/test_config_xml_full/configs/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@
995995
<anonymize>false</anonymize>
996996
<!-- Default endpoint should be changed to different Sentry DSN only if you have -->
997997
<!-- some in-house engineers or hired consultants who're going to debug ClickHouse issues for you -->
998-
<endpoint>https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277</endpoint>
998+
<endpoint></endpoint>
999999
</send_crash_reports>
10001000

10011001
<!-- Uncomment to disable ClickHouse internal DNS caching. -->

tests/integration/test_config_xml_main/configs/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,6 @@
195195
<send_crash_reports>
196196
<enabled>false</enabled>
197197
<anonymize>false</anonymize>
198-
<endpoint>https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277</endpoint>
198+
<endpoint></endpoint>
199199
</send_crash_reports>
200200
</clickhouse>

tests/integration/test_config_xml_yaml_mix/configs/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
<send_crash_reports>
196196
<enabled>false</enabled>
197197
<anonymize>false</anonymize>
198-
<endpoint>https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277</endpoint>
198+
<endpoint></endpoint>
199199
</send_crash_reports>
200200

201201
<mark_cache_size>123451234</mark_cache_size>

tests/integration/test_config_yaml_full/configs/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,5 @@ query_masking_rules:
133133
send_crash_reports:
134134
enabled: false
135135
anonymize: false
136-
endpoint: 'https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277'
136+
endpoint: ''
137137

0 commit comments

Comments
 (0)