Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
9d6c1f1b
Commit
9d6c1f1b
authored
Feb 10, 2020
by
Steven Murray
Browse files
Upgraded PostgreSQL server to version 12
parent
f51aaa4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
9d6c1f1b
...
...
@@ -137,7 +137,7 @@ dbunittests_postgresql:
-
createrepo ${CTAREPODIR}; echo -e "[cta-artifacts]\nname=CTA artifacts\nbaseurl=file://${CTAREPODIR}\ngpgcheck=0\nenabled=1\npriority=2" > /etc/yum.repos.d/cta-artifacts.repo
-
yum -y --nogpgcheck install cta-systemtests cta-debuginfo sqlite-debuginfo --enablerepo=debug
-
yum -y install cta-catalogueutils
-
yum -y install rh-postgresql
96
-postgresql-server
-
yum -y install rh-postgresql
12
-postgresql-server
-
POSTGRESQL_DATA_DIR=/usr/local/cta_test_pgsql_data
-
POSTGRESQL_LOG_DIR=/var/log/postgres
-
echo POSTGRESQL_DATA_DIR=${POSTGRESQL_DATA_DIR}
...
...
@@ -146,8 +146,8 @@ dbunittests_postgresql:
-
chown -R postgres:postgres ${POSTGRESQL_DATA_DIR}
-
mkdir -p ${POSTGRESQL_LOG_DIR}
-
chown -R postgres:postgres ${POSTGRESQL_LOG_DIR}
-
export LD_LIBRARY_PATH=/opt/rh/rh-postgresql
96
/root/usr/lib64
-
POSTGRES_BIN=/opt/rh/rh-postgresql
96
/root/usr/bin
-
export LD_LIBRARY_PATH=/opt/rh/rh-postgresql
12
/root/usr/lib64
-
POSTGRES_BIN=/opt/rh/rh-postgresql
12
/root/usr/bin
-
echo POSTGRES_BIN=${POSTGRES_BIN}
-
runuser -u postgres -- ${POSTGRES_BIN}/initdb -D ${POSTGRESQL_DATA_DIR}
-
runuser -u postgres -- ${POSTGRES_BIN}/pg_ctl start -w -t 10 -D ${POSTGRESQL_DATA_DIR} -l ${POSTGRESQL_LOG_DIR}/cta_test_postgres.log
...
...
tests/postgresqlUnitTests.sh
View file @
9d6c1f1b
...
...
@@ -2,8 +2,8 @@
# Utility script to run postgresql tests like in CI.
if
!
rpm
-q
--quiet
rh-postgresql
96
-postgresql-server
;
then
echo
"Please install the package rh-postgresql
96
-postgresql-server to run this script."
if
!
rpm
-q
--quiet
rh-postgresql
12
-postgresql-server
;
then
echo
"Please install the package rh-postgresql
12
-postgresql-server to run this script."
exit
1
fi
...
...
@@ -25,8 +25,8 @@ mkdir -p ${POSTGRESQL_DATA_DIR}
chown
-R
postgres:postgres
${
POSTGRESQL_DATA_DIR
}
mkdir
-p
${
POSTGRESQL_LOG_DIR
}
chown
-R
postgres:postgres
${
POSTGRESQL_LOG_DIR
}
export
LD_LIBRARY_PATH
=
/opt/rh/rh-postgresql
96
/root/usr/lib64
POSTGRES_BIN
=
/opt/rh/rh-postgresql
96
/root/usr/bin
export
LD_LIBRARY_PATH
=
/opt/rh/rh-postgresql
12
/root/usr/lib64
POSTGRES_BIN
=
/opt/rh/rh-postgresql
12
/root/usr/bin
echo
POSTGRES_BIN
=
${
POSTGRES_BIN
}
(
cd
/
;
runuser
-u
postgres
--
${
POSTGRES_BIN
}
/initdb
-D
${
POSTGRESQL_DATA_DIR
}
...
...
@@ -40,4 +40,4 @@ echo 'postgresql:postgresql://cta@localhost/cta' > ${CTA_CATALOGUE_CONF}
./catalogue/cta-catalogue-schema-create
${
CTA_CATALOGUE_CONF
}
./tests/cta-rdbmsUnitTests
${
CTA_CATALOGUE_CONF
}
(
cd
/
;
runuser
-u
postgres
--
${
POSTGRES_BIN
}
/pg_ctl stop
-D
${
POSTGRESQL_DATA_DIR
}
)
rm
-rf
${
POSTGRESQL_DATA_DIR
}
\ No newline at end of file
rm
-rf
${
POSTGRESQL_DATA_DIR
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment