Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packaging_automation/citus_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def get_postgres_versions(
if exclude_dict_nightly and platform_key_nightly in exclude_dict_nightly:
nightly_versions = [
v
for v in release_versions
for v in nightly_versions
if v not in exclude_dict_nightly[platform_key_nightly]
]

Expand Down
28 changes: 8 additions & 20 deletions packaging_automation/publish_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ class DockerImageType(Enum):
latest = 1
alpine = 2
nightly = 3
postgres_14 = 4
postgres_15 = 5
postgres_16 = 6
postgres_17 = 7
postgres_18 = 8
postgres_17 = 4
postgres_18 = 5
postgres_19 = 6


class ManualTriggerType(Enum):
Expand All @@ -58,21 +56,6 @@ class ScheduleType(Enum):
"docker-tag": "alpine",
"schedule-type": ScheduleType.regular,
},
DockerImageType.postgres_14: {
"file-name": "postgres-14/Dockerfile",
"docker-tag": "pg14",
"schedule-type": ScheduleType.regular,
},
DockerImageType.postgres_15: {
"file-name": "postgres-15/Dockerfile",
"docker-tag": "pg15",
"schedule-type": ScheduleType.regular,
},
DockerImageType.postgres_16: {
"file-name": "postgres-16/Dockerfile",
"docker-tag": "pg16",
"schedule-type": ScheduleType.regular,
},
DockerImageType.postgres_17: {
"file-name": "postgres-17/Dockerfile",
"docker-tag": "pg17",
Expand All @@ -83,6 +66,11 @@ class ScheduleType(Enum):
"docker-tag": "pg18",
"schedule-type": ScheduleType.regular,
},
DockerImageType.postgres_19: {
"file-name": "postgres-19/Dockerfile",
"docker-tag": "pg19",
"schedule-type": ScheduleType.regular,
},
DockerImageType.nightly: {
"file-name": "nightly/Dockerfile",
"docker-tag": "nightly",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apk add --no-cache \
curl-dev \
openssl-dev \
ca-certificates \
clang \
llvm \
clang21 \
llvm21 \
lz4-dev \
zstd-dev \
libxslt-dev \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ LABEL maintainer="Citus Data https://citusdata.com" \
ENV CITUS_VERSION ${VERSION}.citus-1

# install Citus
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
ca-certificates=* \
curl=* \
&& curl -s https://install.citusdata.com/community/deb.sh | bash \
&& apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \
postgresql-$PG_MAJOR-hll=2.17.citus-1 \
postgresql-$PG_MAJOR-topn=2.5.0.citus-1 \
&& apt-get install -y --no-install-recommends "postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION" \
"postgresql-$PG_MAJOR-hll=2.21.citus-1" \
"postgresql-$PG_MAJOR-topn=2.7.1.citus-1" \
&& apt-get purge -y --auto-remove curl \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -33,10 +34,10 @@ COPY 001-create-citus-extension.sql /docker-entrypoint-initdb.d/

# add health check script
COPY pg_healthcheck wait-for-manager.sh /
RUN chmod +x /wait-for-manager.sh
RUN chmod +x /wait-for-manager.sh \
&& sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh

# entry point unsets PGPASSWORD, but we need it to connect to workers
# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303
RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh

HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apt-get update \
curl \
&& curl -s https://install.citusdata.com/community/deb.sh | bash \
&& apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \
postgresql-$PG_MAJOR-hll=2.18.citus-1 \
postgresql-$PG_MAJOR-topn=2.7.0.citus-1 \
postgresql-$PG_MAJOR-hll=2.21.citus-1 \
postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \
&& apt-get purge -y --auto-remove curl \
&& rm -rf /var/lib/apt/lists/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apt-get update \
curl \
&& curl -s https://install.citusdata.com/community/deb.sh | bash \
&& apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \
postgresql-$PG_MAJOR-hll=2.19.citus-1 \
postgresql-$PG_MAJOR-topn=2.7.0.citus-1 \
postgresql-$PG_MAJOR-hll=2.21.citus-1 \
postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \
&& apt-get purge -y --auto-remove curl \
&& rm -rf /var/lib/apt/lists/*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is auto generated from it's template,
# see citusdata/tools/packaging_automation/templates/docker/postgres-16/postgres-16.tmpl.dockerfile.
# see citusdata/tools/packaging_automation/templates/docker/postgres-19/postgres-19.tmpl.dockerfile.
FROM postgres:{{postgres_version}}
ARG VERSION={{project_version}}
LABEL maintainer="Citus Data https://citusdata.com" \
Expand All @@ -20,8 +20,8 @@ RUN apt-get update \
curl \
&& curl -s https://install.citusdata.com/community/deb.sh | bash \
&& apt-get install -y postgresql-$PG_MAJOR-citus-{{project_minor_version}}=$CITUS_VERSION \
postgresql-$PG_MAJOR-hll=2.18.citus-1 \
postgresql-$PG_MAJOR-topn=2.6.0.citus-1 \
postgresql-$PG_MAJOR-hll=2.21.citus-1 \
postgresql-$PG_MAJOR-topn=2.7.1.citus-1 \
&& apt-get purge -y --auto-remove curl \
&& rm -rf /var/lib/apt/lists/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apk add --no-cache \
curl-dev \
openssl-dev \
ca-certificates \
clang \
llvm \
clang21 \
llvm21 \
lz4-dev \
zstd-dev \
libxslt-dev \
Expand Down
3 changes: 2 additions & 1 deletion packaging_automation/tests/test_citus_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ def test_get_postgres_versions_ol_7():
)
# pg 15 is excluded for all releases with pg_exclude file
assert len(release_versions) == 2 and release_versions == ["13", "14"]
assert len(nightly_versions) == 2 and nightly_versions == ["13", "14"]
# pg 15 is additionally excluded for ol/7 nightlies, leaving only pg 14
assert len(nightly_versions) == 1 and nightly_versions == ["14"]


def test_get_postgres_versions_el_7():
Expand Down
4 changes: 2 additions & 2 deletions packaging_automation/tests/test_publish_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def test_get_image_tag():
assert image_name == "12.0.0"

image_name = get_image_tag(
remove_prefix(TAG_NAME, "v"), DockerImageType.postgres_15
remove_prefix(TAG_NAME, "v"), DockerImageType.postgres_19
)
assert image_name == "12.0.0-pg15"
assert image_name == "12.0.0-pg19"


def test_publish_main_docker_images():
Expand Down
Loading
Loading