mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Support building PostgreSQL in UBI
Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
This commit is contained in:
parent
5a616c5a40
commit
4b0462b4be
1 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue