From 1ffd84e967e934750f8694bbed20b1b211b7d083 Mon Sep 17 00:00:00 2001 From: Andy Pfister Date: Sun, 22 Sep 2024 20:11:44 +0200 Subject: [PATCH] Make Postgres version visible to Renovate --- Dockerfile.alpine | 30 ++++++++++++++++++++---------- Dockerfile.bookworm | 32 +++++++++++++++++++++----------- renovate.json | 3 ++- 3 files changed, 43 insertions(+), 22 deletions(-) diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 46f1b70..553b10e 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -8,11 +8,21 @@ ENV PG95=9.5.25 ENV PG96=9.6.24 ENV PG10=10.23 ENV PG11=11.22 -ENV PG12=12.20 -ENV PG13=13.16 -ENV PG14=14.13 -ENV PG15=15.8 -ENV PG16=16.4 + +# renovate: datasource=repology depName=macports/postgresql12-server versioning=loose +ENV PG12_VERSION=12.20 + +# renovate: datasource=repology depName=macports/postgresql13-server versioning=loose +ENV PG13_VERSION=13.16 + +# renovate: datasource=repology depName=macports/postgresql14-server versioning=loose +ENV PG14_VERSION=14.13 + +# renovate: datasource=repology depName=macports/postgresql15-server versioning=loose +ENV PG15_VERSION=15.8 + +# renovate: datasource=repology depName=macports/postgresql16-server versioning=loose +ENV PG16_VERSION=16.4 # Where we'll do all our compiling and similar ENV BUILD_ROOT /buildroot @@ -77,7 +87,7 @@ RUN cd postgresql-11.* && \ ### PostgreSQL 12 FROM base-build as build-12 -RUN wget https://ftp.postgresql.org/pub/source/v${PG12}/postgresql-${PG12}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG12_VERSION}/postgresql-${PG12_VERSION}.tar.bz2 && \ tar -xf postgresql-12*.tar.bz2 RUN cd postgresql-12.* && \ @@ -89,7 +99,7 @@ RUN cd postgresql-12.* && \ ### PostgreSQL 13 FROM base-build as build-13 -RUN wget https://ftp.postgresql.org/pub/source/v${PG13}/postgresql-${PG13}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG13_VERSION}/postgresql-${PG13_VERSION}.tar.bz2 && \ tar -xf postgresql-13*.tar.bz2 RUN cd postgresql-13.* && \ @@ -101,7 +111,7 @@ RUN cd postgresql-13.* && \ ### PostgreSQL 14 FROM base-build as build-14 -RUN wget https://ftp.postgresql.org/pub/source/v${PG14}/postgresql-${PG14}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG14_VERSION}/postgresql-${PG14_VERSION}.tar.bz2 && \ tar -xf postgresql-14*.tar.bz2 RUN cd postgresql-14.* && \ @@ -113,7 +123,7 @@ RUN cd postgresql-14.* && \ ### PostgreSQL 15 FROM base-build as build-15 -RUN wget https://ftp.postgresql.org/pub/source/v${PG15}/postgresql-${PG15}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG15_VERSION}/postgresql-${PG15_VERSION}.tar.bz2 && \ tar -xf postgresql-15*.tar.bz2 RUN cd postgresql-15.* && \ @@ -125,7 +135,7 @@ RUN cd postgresql-15.* && \ ### PostgreSQL 16 FROM base-build as build-16 -RUN wget https://ftp.postgresql.org/pub/source/v${PG16}/postgresql-${PG16}.tar.gz && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG16_VERSION}/postgresql-${PG16_VERSION}.tar.gz && \ tar -xf postgresql-16*.tar.gz RUN cd postgresql-16.* && \ diff --git a/Dockerfile.bookworm b/Dockerfile.bookworm index 6666b97..4e0fe24 100644 --- a/Dockerfile.bookworm +++ b/Dockerfile.bookworm @@ -8,11 +8,21 @@ ENV PG95=9.5.25 ENV PG96=9.6.24 ENV PG10=10.23 ENV PG11=11.22 -ENV PG12=12.20 -ENV PG13=13.16 -ENV PG14=14.13 -ENV PG15=15.8 -ENV PG16=16.4 + +# renovate: datasource=repology depName=macports/postgresql12-server versioning=loose +ENV PG12_VERSION=12.20 + +# renovate: datasource=repology depName=macports/postgresql13-server versioning=loose +ENV PG13_VERSION=13.16 + +# renovate: datasource=repology depName=macports/postgresql14-server versioning=loose +ENV PG14_VERSION=14.13 + +# renovate: datasource=repology depName=macports/postgresql15-server versioning=loose +ENV PG15_VERSION=15.8 + +# renovate: datasource=repology depName=macports/postgresql16-server versioning=loose +ENV PG16_VERSION=16.4 # Where we'll do all our compiling and similar ENV BUILD_ROOT /buildroot @@ -75,7 +85,7 @@ RUN cd postgresql-11.* && \ ### PostgreSQL 12 FROM base-build as build-12 -RUN wget https://ftp.postgresql.org/pub/source/v${PG12}/postgresql-${PG12}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG12_VERSION}/postgresql-${PG12_VERSION}.tar.bz2 && \ tar -xf postgresql-12*.tar.bz2 RUN cd postgresql-12.* && \ @@ -87,7 +97,7 @@ RUN cd postgresql-12.* && \ ### PostgreSQL 13 FROM base-build as build-13 -RUN wget https://ftp.postgresql.org/pub/source/v${PG13}/postgresql-${PG13}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG13_VERSION}/postgresql-${PG13_VERSION}.tar.bz2 && \ tar -xf postgresql-13*.tar.bz2 RUN cd postgresql-13.* && \ @@ -99,7 +109,7 @@ RUN cd postgresql-13.* && \ ### PostgreSQL 14 FROM base-build as build-14 -RUN wget https://ftp.postgresql.org/pub/source/v${PG14}/postgresql-${PG14}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG14_VERSION}/postgresql-${PG14_VERSION}.tar.bz2 && \ tar -xf postgresql-14*.tar.bz2 RUN cd postgresql-14.* && \ @@ -111,7 +121,7 @@ RUN cd postgresql-14.* && \ ### PostgreSQL 15 FROM base-build as build-15 -RUN wget https://ftp.postgresql.org/pub/source/v${PG15}/postgresql-${PG15}.tar.bz2 && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG15_VERSION}/postgresql-${PG15_VERSION}.tar.bz2 && \ tar -xf postgresql-15*.tar.bz2 RUN cd postgresql-15.* && \ @@ -123,7 +133,7 @@ RUN cd postgresql-15.* && \ ### PostgreSQL 16 FROM base-build as build-16 -RUN wget https://ftp.postgresql.org/pub/source/v${PG16}/postgresql-${PG16}.tar.gz && \ +RUN wget https://ftp.postgresql.org/pub/source/v${PG16_VERSION}/postgresql-${PG16_VERSION}.tar.gz && \ tar -xf postgresql-16*.tar.gz RUN cd postgresql-16.* && \ @@ -169,4 +179,4 @@ WORKDIR /var/lib/postgresql COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -CMD ["postgres"] \ No newline at end of file +CMD ["postgres"] diff --git a/renovate.json b/renovate.json index 5db72dd..0b293f6 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,7 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:recommended" + "config:recommended", + "customManagers:dockerfileVersions" ] }