Skip to content

Commit

Permalink
Merge 4dcfbef into 282ad5e
Browse files Browse the repository at this point in the history
  • Loading branch information
lwasylow committed Mar 8, 2019
2 parents 282ad5e + 4dcfbef commit 7223839
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -38,6 +38,7 @@ env:
- CACHE_DIR=$HOME/.cache
# Database Env
- SQLCLI="$HOME/sqlcl/bin/sql"
- OJDBC_HOME="$HOME/sqlcl/lib"
- ORACLE_PWD="oracle"
- UT3_DOCKER_REPO="utplsqlv3/oracledb"
- DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}"
Expand Down Expand Up @@ -94,7 +95,7 @@ before_script:
script:
- if [[ ! $TRAVIS_TAG ]]; then bash test/install_and_run_tests.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/validate_report_files.sh; fi
- if [[ ! $TRAVIS_TAG ]] && [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "${TRAVIS_PULL_REQUEST_SLUG}" = "${TRAVIS_REPO_SLUG}" ]; then bash .travis/run_sonar_scanner.sh; fi
- if [[ ! $TRAVIS_TAG ]] && [[ ("${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" && "${TRAVIS_PULL_REQUEST}" == false) || ("${TRAVIS_PULL_REQUEST_SLUG}" = "${UTPLSQL_REPO}") ]]; then bash .travis/run_sonar_scanner.sh; fi
- if [[ ! $TRAVIS_TAG ]]; then bash .travis/coveralls_uploader.sh; fi

notifications:
Expand Down
11 changes: 11 additions & 0 deletions .travis/run_sonar_scanner.sh
Expand Up @@ -12,6 +12,9 @@ PR_KEY_PROPERTY="sonar.pullrequest.key"
PR_SONAR_BASE_PROPERTY="sonar.pullrequest.base"
PR_SONAR_TOKEN_PROPERTY="sonar.pullrequest.github.token.secured"

DB_URL_SONAR_PROPERTY="sonar.plsql.jdbc.url"
DB_DRIVER_PATH="sonar.plsql.jdbc.driver.path"

#Add property to file
function add_sonar_property {
echo "$1=$2" >> sonar-project.properties
Expand Down Expand Up @@ -52,5 +55,13 @@ else
echo "No need to update sonar we building on release or develop"
fi

#Address issue : Could not find ref 'develop' in refs/heads or refs/remotes/origin
git fetch --no-tags https://github.com/utPLSQL/utPLSQL.git +refs/heads/develop:refs/remotes/origin/develop

echo "Adding OJDBC Driver Path ${OJDBC_HOME}/ojdbc8.jar"
add_sonar_property "${DB_URL_SONAR_PROPERTY}" "jdbc:oracle:thin:@${CONNECTION_STR}"
add_sonar_property "${DB_DRIVER_PATH}" "${OJDBC_HOME}/ojdbc8.jar"


#Execute Sonar scanner
sonar-scanner
10 changes: 10 additions & 0 deletions sonar-project.properties
Expand Up @@ -19,9 +19,19 @@ sonar.projectDescription=PL/SQL Unit Testing Framework
sonar.plsql.file.suffixes=sql,tab,pkb,tpb
sonar.language=plsql

sonar.exclusions=create_synonyms_and_grants_for_public.sql, create_user_grants.sql, create_user_synonyms.sql, create_utplsql_owner.sql, define_ut3_owner_param.sql, install.sql, install_above_12_1.sql, install_component.sql, install_headless.sql, uninstall.sql, uninstall_all.sql, uninstall_coverage_tables.sql


sonar.pullrequest.provider=github
sonar.pullrequest.github.endpoint=https://api.github.com/
sonar.pullrequest.github.repository=utPLSQL/utPLSQL

sonar.plsql.jdbc.driver.class=oracle.jdbc.OracleDriver
sonar.plsql.jdbc.user=UT3
sonar.plsql.jdbc.password=ut3
sonar.plsql.defaultSchema=UT3



# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit 7223839

Please sign in to comment.