Support building PostgreSQL in UBI

Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
This commit is contained in:
Balasankar "Balu" C 2022-07-05 10:43:04 +05:30
parent 5a616c5a40
commit 4b0462b4be
No known key found for this signature in database
GPG key ID: B77D2E2E23735427

View file

@ -23,6 +23,20 @@ function build_debian() {
rm -rf /var/lib/apt/lists/*
}
function build_ubi() {
UBI_VERSION=$(lsb_release -a | awk '/Release/ { print $2 }')
UBI_MAJOR_VERSION=${UBI_VERSION%.*} # strip last component
yum install -y "https://download.postgresql.org/pub/repos/yum/reporpms/EL-${UBI_MAJOR_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm"
yum update -y
yum install -y postgresql${POSTGRES_VERSION}
yum autoremove -y
yum clean -y all
}
BUILD_OS=${BUILD_OS:-debian}
if [[ $BUILD_OS =~ debian ]]; then