Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PostgreSQL 17 support #58

Merged
merged 1 commit into from
Sep 28, 2024
Merged
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
47 changes: 47 additions & 0 deletions build/pgtap/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# syntax=docker/dockerfile:1

FROM postgres:17-alpine3.20 AS build-pgtap-psql-17

ARG PGTAP_VERSION

COPY pgtap-$PGTAP_VERSION /opt/pgtap-$PGTAP_VERSION

RUN <<SETUP
set -eux

apk update

apk add \
bash \
build-base \
make \
openssl \
perl \
perl-dev \
postgresql-dev \
wget

wanted_clang=$(
pg_config --configure |
tr ' ' '\n' |
grep CLANG |
sed "s/'CLANG=\(.*\)'/\1/"
)

if ! command -v "${wanted_clang}" >/dev/null 2>/dev/null; then
version="${wanted_clang/clang-}"
apk add clang"${version}" llvm"${version}"
fi

mkdir -p /opt/pgtap/17
SETUP

RUN <<BUILD
set -eux

cd /opt/pgtap-$PGTAP_VERSION
make
make install
mv sql/pgtap.sql sql/uninstall_pgtap.sql /opt/pgtap/17
BUILD


FROM postgres:16-alpine3.20 AS build-pgtap-psql-16

ARG PGTAP_VERSION
Expand Down Expand Up @@ -372,6 +418,7 @@ FROM alpine:3.20 AS package-pgtap

RUN mkdir -p /opt/pgtap

COPY --from=build-pgtap-psql-17 /opt/pgtap/17 /opt/pgtap/17
COPY --from=build-pgtap-psql-16 /opt/pgtap/16 /opt/pgtap/16
COPY --from=build-pgtap-psql-15 /opt/pgtap/15 /opt/pgtap/15
COPY --from=build-pgtap-psql-14 /opt/pgtap/14 /opt/pgtap/14
Expand Down
3 changes: 3 additions & 0 deletions build/pgtap/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"alpine": "3.20"
},
"postgres": [
{
"name": "17"
},
{
"name": "16",
"version": "16"
Expand Down
Loading
Loading