Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 328d05d

Browse files
committed
Changing how to get the connection string.
1 parent bfcb207 commit 328d05d

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ install:
6868
#- bash .travis/oracle/install.sh
6969

7070
script:
71+
- CONTAINER_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ORACLE_VERSION)
72+
- test $ORACLE_VERSION = $ORACLE_12cR1SE || CONNECTION_STR="$CONTAINER_IP:1521/ORCLPDB1"
73+
- test $ORACLE_VERSION = $ORACLE_11gR2XE || CONNECTION_STR="$CONTAINER_IP:1521/XE"
7174
- bash .travis/create_utplsql_owner.sh
7275
- bash .travis/create_utplsql_user.sh
7376
- bash .travis/install_libraries.sh

.travis/start_db.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ if [ $ORACLE_VERSION = $ORACLE_12cR1SE ]; then
1313
docker run -d --name $ORACLE_VERSION -p 1521:1521 -v $HOME/$ORACLE_VERSION:/opt/oracle/oradata viniciusam/oracle-12c-r1-se
1414
docker logs -f $ORACLE_VERSION | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered
1515
docker exec $ORACLE_VERSION ./setPassword.sh $ORACLE_PWD
16-
17-
export CONTAINER_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ORACLE_VERSION)
18-
export CONNECTION_STR="$CONTAINER_IP:1521/ORCLPDB1"
1916
fi
2017

2118
# Oracle 11g R2 XE
@@ -24,9 +21,6 @@ if [ $ORACLE_VERSION = $ORACLE_11gR2XE ]; then
2421
docker run -d --name $ORACLE_VERSION --shm-size=1g -p 1521:1521 -v $HOME/$ORACLE_VERSION:/u01/app/oracle/oradata vavellar/oracle-11g-r2-xe
2522
docker logs -f $ORACLE_VERSION | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered
2623
docker exec $ORACLE_VERSION ./setPassword.sh $ORACLE_PWD
27-
28-
export CONTAINER_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ORACLE_VERSION)
29-
export CONNECTION_STR="$CONTAINER_IP:1521/XE"
3024
fi
3125

3226
# Save the oracledata dir to cache.

0 commit comments

Comments
 (0)