From c36eb18dc3112e699bc7ef57fa2ff8bc9396ece3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 17 Mar 2021 17:38:59 +0100 Subject: [PATCH] Switch to using Oracle 11g Docker container This should be simpler than installing it every time and seems to work more reliably in local testing. --- scripts/ci/before_build_oracle.sh | 49 ++++++++++++++--------------- scripts/ci/before_install_oracle.sh | 45 +++++++++++++++++++++----- scripts/ci/build_oracle.sh | 2 +- scripts/ci/oracle.sh | 19 ++++++++++- 4 files changed, 80 insertions(+), 35 deletions(-) diff --git a/scripts/ci/before_build_oracle.sh b/scripts/ci/before_build_oracle.sh index 3d7b10d3..481bc99b 100755 --- a/scripts/ci/before_build_oracle.sh +++ b/scripts/ci/before_build_oracle.sh @@ -1,5 +1,5 @@ -#!/bin/bash -# Sets up environment for p6psy backend Oracle in CI builds +#!/bin/bash -e +# Configures Oracle database for SOCI Oracle backend CI builds. # # Copyright (c) 2013 Peter Butkovic # @@ -7,35 +7,32 @@ # Changes: # - Check connection as user for testing # +# Copyright (c) 2021 Vadim Zeitlin +# - Rewrote to work with Docker Oracle container + source ${SOCI_SOURCE_DIR}/scripts/ci/common.sh -echo "ORACLE_HOME=${ORACLE_HOME}" -echo "ORACLE_SID=${ORACLE_SID}" -# travis-oracle installer created travis user w/o password -echo "ALTER USER travis IDENTIFIED BY travis;" | \ -$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA - -echo "grant connect, resource to travis;" | \ -$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA - -echo "grant create session, alter any procedure to travis;" | \ -$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA - -# to enable xa recovery, see: https://community.oracle.com/thread/378954 -echo "grant select on sys.dba_pending_transactions to travis;" | \ -$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA -echo "grant select on sys.pending_trans$ to travis;" | \ -$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA -echo "grant select on sys.dba_2pc_pending to travis;" | \ -$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA -echo "grant execute on sys.dbms_system to travis;" | \ -$ORACLE_HOME/bin/sqlplus -S -L sys/travis AS SYSDBA +# create the user for the tests +oracle_sqlplus sys/oracle AS SYSDBA <