Skip to content
Draft
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- [#62] Update PostgreSQL to 17.6
- [#62] Update Makefiles to 10.2.1
- [#62] Update base image to 3.22.0-4

## [v14.18-2] - 2025-08-25
### Fixed
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.cloudogu.com/official/base:3.18.9-3 AS builder
FROM registry.cloudogu.com/official/base:3.22.0-4 AS builder

ENV GOSU_SHA256=bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3

Expand All @@ -15,22 +15,22 @@ RUN set -x -o errexit \
&& echo "${GOSU_SHA256} */build/usr/local/bin/gosu" | sha256sum -c - \
&& chmod +x /build/usr/local/bin/gosu

FROM registry.cloudogu.com/official/base:3.18.9-3
FROM registry.cloudogu.com/official/base:3.22.0-4

LABEL NAME="official/postgresql" \
VERSION="14.18-2" \
VERSION="17.6-0" \
maintainer="[email protected]"

ENV LANG=en_US.utf8 \
PGDATA=/var/lib/postgresql \
POSTGRESQL_VERSION=14.18-r0
POSTGRESQL_VERSION=17.6-r0

RUN set -x -o errexit \
&& set -o nounset \
&& set -o pipefail \
&& apk update \
&& apk upgrade \
&& apk add --no-cache --update postgresql14="${POSTGRESQL_VERSION}" postgresql14-contrib="${POSTGRESQL_VERSION}"
&& apk add --no-cache --update postgresql17="${POSTGRESQL_VERSION}" postgresql17-contrib="${POSTGRESQL_VERSION}"

COPY resources/ /
COPY --from=builder /build /
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAKEFILES_VERSION=10.2.0
MAKEFILES_VERSION=10.2.1

.DEFAULT_GOAL:=dogu-release

Expand All @@ -7,4 +7,4 @@ include build/make/self-update.mk
include build/make/release.mk
include build/make/bats.mk
include build/make/k8s-dogu.mk
include build/make/prerelease.mk
include build/make/prerelease.mk
2 changes: 1 addition & 1 deletion dogu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name": "official/postgresql",
"Version": "14.18-2",
"Version": "17.6-0",
"DisplayName": "PostgreSQL",
"Description": "PostgreSQL Database.",
"Url": "https://www.postgresql.org/",
Expand Down
37 changes: 37 additions & 0 deletions resources/post-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,43 @@ function reindexAllDatabases() {
reindexdb -U postgres --verbose --all
}

function assertVersionFormat() {
if [[ "${1}" =~ ^[0-9]+\.[0-9]+\.[0-9]+-[0-9]+$ ]]; then
return 0
else
echo >&2 "invalid version format: ${1}"
exit 1
fi
}

function versionXGreaterOrEqualThanY() {
assertVersionFormat "${1}"
assertVersionFormat "${2}"
local a="${1%%-*}"
local b="${2%%-*}"
local smallest="$(printf '%s\n' "$b" "$a" | sort -V | head -n1)"
if test "$smallest" = "$b"; then
# $a >= $b
return 0 # true
else
return 1 # false
fi
}

function versionXLessThanY() {
assertVersionFormat "${1}"
assertVersionFormat "${2}"
local a="${1%%-*}"
local b="${2%%-*}"
local smallest="$(printf '%s\n' "$a" "$b" | sort -V | head -n1)"
if test "$smallest" = "$a" && test "$a" != "$b"; then
# $a < $b
return 0 # true
else
return 1 # false
fi
}

# versionXLessOrEqualThanY returns true if X is less than or equal to Y; otherwise false
function versionXLessOrEqualThanY() {
local sourceVersion="${1}"
Expand Down
2 changes: 1 addition & 1 deletion spec/goss/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ file:
owner: postgres
filetype: directory
package:
postgresql14:
postgresql17:
installed: true
port:
tcp:5432:
Expand Down