Skip to content

Commit

Permalink
Add PostgreSQL 17 support
Browse files Browse the repository at this point in the history
  • Loading branch information
halostatue committed Sep 28, 2024
1 parent ddf0a59 commit 2bf9128
Show file tree
Hide file tree
Showing 5 changed files with 12,564 additions and 0 deletions.
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

0 comments on commit 2bf9128

Please sign in to comment.