Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix build
  • Loading branch information
viniciusam committed May 19, 2017
commit 02e7a703bc5a552aa494bd7650ae42099b79ec87
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ env:
- DOCKER_CFG=$HOME/.docker
- DOCKER_REPO="viniciusam/oracledb"
- MAVEN_HOME=/usr/local/maven
- DB_USER=app
- DB_PASS=app
- MAVEN_CFG=$HOME/.m2
- API_DB_URL="127.0.0.1:1521:XE"
- API_DB_USER=api
- API_DB_PASS=api
matrix:
- ORACLE_VERSION="11g-xe-r2" CONNECTION_STR="127.0.0.1:1521/XE" DOCKER_OPTIONS="--shm-size=1g"

cache:
directories:
- $DOCKER_CFG
- $HOME/.m2
- $MAVEN_CFG
- $MAVEN_HOME/lib/ext # Used to cache wagon-http lib.

install:
Expand Down
2 changes: 1 addition & 1 deletion .travis/create_app_user.sh → .travis/create_api_user.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -ev

sqlplus -S -L sys/oracle@//$CONNECTION_STR AS SYSDBA <<EOF
sqlplus -S -L / AS SYSDBA <<EOF
create user $DB_USER identified by $DB_PASS
quota unlimited on USERS
default tablespace USERS;
Expand Down
3 changes: 2 additions & 1 deletion .travis/install_utplsql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ EOF
# docker cp ./$UTPLSQL_FILE.tar.gz $ORACLE_VERSION:/$UTPLSQL_FILE.tar.gz
docker cp ./$UTPLSQL_FILE $ORACLE_VERSION:/$UTPLSQL_FILE
docker cp ./install.sh.tmp $ORACLE_VERSION:/install.sh
docker cp ./create_api_user.sh $ORACLE_VERSION:/create_api_user.sh

# Remove temporary files.
# rm $UTPLSQL_FILE.tar.gz
rm install.sh.tmp

# Execute the utPLSQL installation inside the container.
docker exec $ORACLE_VERSION bash install.sh
docker exec $ORACLE_VERSION bash -c "install.sh && create_api_user.sh"
16 changes: 6 additions & 10 deletions .travis/maven_cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
set -ev
cd $(dirname $(readlink -f $0))

mavenSettings=$HOME/.m2/settings.xml
mavenCached=$HOME/.m2/.cached

if [ -f $mavenCached ]; then
echo "Using cached maven user config..."
if [ -f $MAVEN_CFG/repository ]; then
echo "Using cached maven dependencies..."
exit 0
fi

Expand All @@ -21,8 +18,7 @@ curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.
sudo mv wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/

# Create the settings file with oracle server config.
cp settings.tmpl.xml $mavenSettings
sed -i -e "s|###USERNAME###|$ORACLE_OTN_USER|g" $mavenSettings
sed -i -e "s|###PASSWORD###|$ORACLE_OTN_PASSWORD|g" $mavenSettings

touch $mavenCached
cp settings.xml $MAVEN_CFG/settings.xml
#cp settings.tmpl.xml $MAVEN_CFG/settings.xml
#sed -i -e "s|###USERNAME###|$ORACLE_OTN_USER|g" $MAVEN_CFG/settings.xml
#sed -i -e "s|###PASSWORD###|$ORACLE_OTN_PASSWORD|g" $MAVEN_CFG/settings.xml
6 changes: 3 additions & 3 deletions src/test/java/io/github/utplsql/api/rules/DatabaseRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public class DatabaseRule extends ExternalResource {
private static String sPass;

static {
sUrl = System.getenv("DB_URL") != null ? System.getenv("DB_URL") : "127.0.0.1:1521:XE";
sUser = System.getenv("DB_USER") != null ? System.getenv("DB_USER") : "app";
sPass = System.getenv("DB_PASS") != null ? System.getenv("DB_PASS") : "app";
sUrl = System.getenv("API_DB_URL") != null ? System.getenv("API_DB_URL") : "127.0.0.1:1521:XE";
sUser = System.getenv("API_DB_USER") != null ? System.getenv("API_DB_USER") : "app";
sPass = System.getenv("API_DB_PASS") != null ? System.getenv("API_DB_PASS") : "app";
}

private List<Connection> connectionList;
Expand Down