From 065c31313eb93cca4f13b93527178eec849e1c54 Mon Sep 17 00:00:00 2001 From: vados Date: Sun, 29 Sep 2024 22:27:28 +0900 Subject: [PATCH] chore: pg 16.2 -> 16.4 Signed-off-by: vados --- .../workflows/build-and-test-gnu/action.yaml | 4 +- .github/workflows/build-rpm/action.yaml | 4 +- .github/workflows/container.yaml | 4 +- .github/workflows/release.yaml | 4 +- Justfile | 6 +-- ...idkit-pg16.4-alpine3.20.3-amd64.Dockerfile | 45 +++++++++++++++++++ 6 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 infra/docker/pg_idkit-pg16.4-alpine3.20.3-amd64.Dockerfile diff --git a/.github/workflows/build-and-test-gnu/action.yaml b/.github/workflows/build-and-test-gnu/action.yaml index 434822c..e45a312 100644 --- a/.github/workflows/build-and-test-gnu/action.yaml +++ b/.github/workflows/build-and-test-gnu/action.yaml @@ -47,9 +47,9 @@ inputs: PGRX version (ex. 'pg15', 'pg16') pg-version: type: string - default: 16.2 + default: 16.4 decription: | - Postgres version (ex. '15.6, '16.2') + Postgres version (ex. '15.8', '16.4') outputs: {} runs: using: "composite" diff --git a/.github/workflows/build-rpm/action.yaml b/.github/workflows/build-rpm/action.yaml index 7736561..e9ee573 100644 --- a/.github/workflows/build-rpm/action.yaml +++ b/.github/workflows/build-rpm/action.yaml @@ -26,9 +26,9 @@ inputs: PGRX version (ex. 'pg15', 'pg16') pg-version: type: string - default: 16.2 + default: 16.4 decription: | - Postgres version (ex. '15.6, '16.2') + Postgres version (ex. '15.8', '16.4') cargo-pgrx-version: type: string default: 0.11.3 diff --git a/.github/workflows/container.yaml b/.github/workflows/container.yaml index 9b6bfd2..47d7f76 100644 --- a/.github/workflows/container.yaml +++ b/.github/workflows/container.yaml @@ -29,8 +29,8 @@ jobs: runner: ubuntu-22.04 container: arch: amd64 - pg_version: 16.2 - os_version: alpine3.18 + pg_version: 16.4 + os_version: alpine3.20.3 steps: - uses: actions/checkout@v3 - uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index be47406..e2cc4f6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,7 +33,7 @@ jobs: - pgrx: pg-version: pg16 pg: - version: 16.2 + version: 16.4 steps: - uses: actions/checkout@v3 @@ -59,7 +59,7 @@ jobs: - pgrx: pg-version: pg16 pg: - version: 16.2 + version: 16.4 steps: - uses: actions/checkout@v3 diff --git a/Justfile b/Justfile index 0480c10..b04449f 100644 --- a/Justfile +++ b/Justfile @@ -26,7 +26,7 @@ cargo_features_arg := if cargo_features != "" { changelog_file_path := absolute_path(justfile_directory() / "CHANGELOG") -pkg_pg_version := env_var_or_default("PKG_PG_VERSION", "16.2") +pkg_pg_version := env_var_or_default("PKG_PG_VERSION", "16.4") pkg_pg_config_path := env_var_or_default("PKG_PG_CONFIG_PATH", "~/.pgrx/" + pkg_pg_version + "/pgrx-install/bin/pg_config") pkg_tarball_suffix := env_var_or_default("PKG_TARBALL_SUFFIX", "") @@ -138,8 +138,8 @@ pgrx-init: container_img_arch := env_var_or_default("CONTAINER_IMAGE_ARCH", "amd64") -pg_image_version := env_var_or_default("POSTGRES_IMAGE_VERSION", "16.2") -pg_os_image_version := env_var_or_default("POSTGRES_OS_IMAGE_VERSION", "alpine3.18") +pg_image_version := env_var_or_default("POSTGRES_IMAGE_VERSION", "16.4") +pg_os_image_version := env_var_or_default("POSTGRES_OS_IMAGE_VERSION", "alpine3.20.3") pgidkit_image_name := env_var_or_default("PGIDKIT_IMAGE_NAME", "ghcr.io/vadosware/pg_idkit") pgidkit_image_tag := env_var_or_default("POSGRES_IMAGE_VERSION", version + "-" + "pg" + pg_image_version + "-" + pg_os_image_version + "-" + container_img_arch) diff --git a/infra/docker/pg_idkit-pg16.4-alpine3.20.3-amd64.Dockerfile b/infra/docker/pg_idkit-pg16.4-alpine3.20.3-amd64.Dockerfile new file mode 100644 index 0000000..6a3c11d --- /dev/null +++ b/infra/docker/pg_idkit-pg16.4-alpine3.20.3-amd64.Dockerfile @@ -0,0 +1,45 @@ +# +# NOTE: you must have the base packaging layer built for this image to work +# you can build this from scratch with `just build-base-pkg-image` +# +FROM ghcr.io/vadosware/pg_idkit/base-pkg:0.1.x-alpine3.20.3-amd64 AS builder + +ARG USER +ENV USER=$USER + +ARG PGRX_PG_VERSION=pg16 +ENV PGRX_PG_VERSION=$PGRX_PG_VERSION + +ARG PKG_PG_VERSION=16.4 +ENV PKG_PG_VERSION=$PKG_PG_VERSION + +ENV PKG_TARBALL_SUFFIX="-musl" + +# Re-run the build with the latest code +WORKDIR /pg_idkit +COPY . . +RUN RUSTFLAGS="-Ctarget-feature=-crt-static" just build package + +FROM postgres:16.4-alpine3.20@sha256:d898b0b78a2627cb4ee63464a14efc9d296884f1b28c841b0ab7d7c42f1fffdf + +# NOTE: PGRX_PG_VERSION is defined via base-pkg:pg16.4-alpine3.20.3-amd64 +ARG PGRX_PG_VERSION=pg16 +ENV PGRX_PG_VERSION=$PGRX_PG_VERSION + +# Install packaged pg_idkit for system postgres +COPY --from=builder /pg_idkit/pg_idkit-*-musl.tar.gz /tmp +RUN tar -C /usr/local --strip-components=1 -xvf /tmp/pg_idkit-*-musl.tar.gz + +ARG PGIDKIT_VERSION +ARG PGIDKIT_REVISION + +LABEL org.opencontainers.image.authors="Victor Adossi " +LABEL org.opencontainers.image.description="A distribution of the base postgres image, with pg_idkit pre-installed." +LABEL org.opencontainers.image.documentation="https://github.com/VADOSWARE/pg_idkit#readme" +LABEL org.opencontainers.image.licenses="Apache-2.0" +LABEL org.opencontainers.image.revision=${PGIDKIT_REVISION} +LABEL org.opencontainers.image.source="https://github.com/VADOSWARE/pg_idkit" +LABEL org.opencontainers.image.title="Postgres + pg_idkit" +LABEL org.opencontainers.image.url="https://github.com/VADOSWARE/pg_idkit" +LABEL org.opencontainers.image.vendor="VADOSWARE" +LABEL org.opencontainers.image.version=v${PGIDKIT_VERSION}