Skip to content
jijid13 edited this page Mar 8, 2017 · 3 revisions

A DockerFile(Image) to be used in Jenkins for Oracle SQL scripts tests. The aim is to make automatic the tests of an Oracle SQL scripts which are used to migrate a Database from an old version to a new one.

In a aim of the Continue Integration this Docker Image allows you to check and test your Sql migration Scripts in a container during the devlopment phase without impacting any of your databases.

Pull the image from the Docker Hub : "docker pull jijid13/oraclesqltests"

Install in your Jenkins the Docker Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin). In Jenkins Administration configure your Docker Server Api and create the Dockers Templates :

in the Docker Template create credentials jenkins:jenkins to be able to connect to the container. I recommand to choose the option "Never pull" to avoid some failing pulls and disk leak usage.

In the Jenkins job fill the restriction project run with the Docker Template label.

in the build section choose execute shell script and define the environment variable and run startup.sh :

"
#!/bin/bash
export DUMP_FILE_PATH=/home/jenkins/workspace/testoracle/dump/metadata.dmp
export INIT_FILES=/home/jenkins/workspace/testoracle/init_files
export SQL_PATH=/home/jenkins/workspace/testoracle/alters
export SYSTEM_SQL_PATH=/home/jenkins/workspace/testoracle/system
export IMPORT_SCHEMA=user1
export SQLPLUS_USER=user1
export SQLPLUS_PASSWORD=oracle

/startup.sh
"

Clone this wiki locally