File tree Expand file tree Collapse file tree 3 files changed +66
-0
lines changed
Expand file tree Collapse file tree 3 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ language : java
2+
3+ services :
4+ - docker
5+
6+ jdk :
7+ - oraclejdk8
8+ - oraclejdk7
9+
10+ env :
11+ global :
12+ - DOCKER_CFG=$HOME/.docker/config.json
13+ - DOCKER_REPO="viniciusam/oracledb"
14+ - UTPLSQL_VERSION="v3.0.0-beta"
15+ - UTPLSQL_FILE="utPLSQLv3.0.0.562-beta"
16+ matrix :
17+ - ORACLE_VERSION="11g-xe-r2" CONNECTION_STR="127.0.0.1:1521/XE" DOCKER_OPTIONS="--shm-size=1g"
18+
19+ cache :
20+ directories :
21+ - $DOCKER_CFG
22+
23+ install :
24+ - bash .travis/start_db.sh
25+ - bash .travis/install_utplsql.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Download the specified version of utPLSQL.
5+ curl -L -O " https://github.com/utPLSQL/utPLSQL/releases/download/$UTPLSQL_VERSION /$UTPLSQL_FILE .tar.gz"
6+
7+ # Create a temporary install script.
8+ cat > install.sh.tmp << EOF
9+ tar -xzf $UTPLSQL_FILE .tar.gz
10+ rm $UTPLSQL_FILE .tar.gz
11+
12+ cd /$UTPLSQL_FILE /source
13+
14+ sqlplus -S -L system/oracle@//$CONNECTION_STR @install_headless.sql
15+ sqlplus -S -L system/oracle@//$CONNECTION_STR @install.sql ut3
16+ EOF
17+
18+ # Copy utPLSQL files to the container and install it.
19+ docker cp ./$UTPLSQL_FILE .tar.gz $ORACLE_VERSION :/$UTPLSQL_FILE .tar.gz
20+ docker cp ./install.sh.tmp $ORACLE_VERSION :/install.sh
21+
22+ # Remove temporary files.
23+ rm $UTPLSQL_FILE .tar.gz
24+ rm install.sh.tmp
25+
26+ # Execute the utPLSQL installation inside the container.
27+ docker exec $ORACLE_VERSION bash install.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # If docker credentials are not cached, do the login.
5+ if [ ! -f $DOCKER_CFG ]; then
6+ docker login -u " $DOCKER_USER " -p " $DOCKER_PASSWORD "
7+ else
8+ echo " Using docker login from cache..."
9+ fi
10+
11+ # Pull the specified db version from docker hub.
12+ docker pull $DOCKER_REPO :$ORACLE_VERSION
13+ docker run -d --name $ORACLE_VERSION $DOCKER_OPTIONS -p 1521:1521 $DOCKER_REPO :$ORACLE_VERSION
14+ docker logs -f $ORACLE_VERSION | grep -m 1 " DATABASE IS READY TO USE!" --line-buffered
You can’t perform that action at this time.
0 commit comments