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

Skip to content

Commit 5657463

Browse files
committed
Update build to include pull requests
1 parent 2d09f43 commit 5657463

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ cache:
6464
- $MAVEN_CFG
6565

6666
before_install:
67-
#debug
68-
- if [[ ! $TRAVIS_TAG ]] && [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ]; then bash .travis/run_sonar_scanner.sh; fi
6967
#The update_project_version.sh is done before deployment to validate that the change of project files does not break installation
7068
- bash .travis/update_project_version.sh
7169
# download latest utPLSQL release

.travis/run_sonar_scanner.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ fi
3232
echo "Check if we running from develop or on branch"
3333
if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [[ ! "${BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|"${MAIN_DEV_BRANCH}")$ ]]; then
3434

35+
echo "" >> sonar-project.properties
3536
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
36-
echo "Updating sonar properties to include branch name"
37+
echo "Updating sonar properties to include branch ${BRANCH}"
3738
add_sonar_property "${BRANCH_SONAR_PROPERTY}" "${BRANCH}"
3839
add_sonar_property "${BRANCH_SONAR_TARGET_PROPERTY}" "${MAIN_DEV_BRANCH}"
3940
else
40-
echo "Updating sonar properties to include pull request name"
41+
echo "Updating sonar properties to include pull request ${BRANCH}"
4142
add_sonar_property "${PR_SONAR_TOKEN_PROPERTY}" "${GITHUB_TRAVISCI_TOKEN}"
4243
add_sonar_property "${PR_SONAR_BRANCH_PROPERTY}" "${BRANCH}"
4344
add_sonar_property "${PR_KEY_PROPERTY}" "${PR}"
@@ -47,8 +48,5 @@ else
4748
echo "No need to update sonar we building on release or develop"
4849
fi
4950

50-
#debug
51-
cat sonar-project.properties
52-
5351
#Execute Sonar scanner
54-
#sonar-scanner
52+
sonar-scanner

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ sonar.pullrequest.github.endpoint=https://api.github.com/
2424
sonar.pullrequest.github.repository=utPLSQL/utPLSQL
2525

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

0 commit comments

Comments
 (0)