aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-10-10 17:43:16 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-10-10 17:43:16 +0200
commit1af027a26a4c694428beea69e3351cb1d0fb95b0 (patch)
tree9f1b3c41fd42fbc25e6df7d003ba12557b009a8e
parent2c37920a15df6b7bf501c478e069f8d60f1859c2 (diff)
downloadsonarqube-1af027a26a4c694428beea69e3351cb1d0fb95b0.tar.gz
sonarqube-1af027a26a4c694428beea69e3351cb1d0fb95b0.zip
Propagate parameters of SQ analysis required by burgr
-rwxr-xr-xtravis.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/travis.sh b/travis.sh
index de9924b57d1..58e2300e41f 100755
--- a/travis.sh
+++ b/travis.sh
@@ -105,7 +105,7 @@ function fixBuildVersion {
#
function configureTravis {
mkdir -p ~/.local
- curl -sSL https://github.com/SonarSource/travis-utils/tarball/v36 | tar zx --strip-components 1 -C ~/.local
+ curl -sSL https://github.com/SonarSource/travis-utils/tarball/v38 | tar zx --strip-components 1 -C ~/.local
source ~/.local/bin/install
}
configureTravis
@@ -146,7 +146,11 @@ BUILD)
mvn sonar:sonar \
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.login=$SONAR_TOKEN \
- -Dsonar.projectVersion=$INITIAL_VERSION
+ -Dsonar.projectVersion=$INITIAL_VERSION \
+ -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
+ -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
+ -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
+ -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo 'Build release branch'
@@ -159,7 +163,11 @@ BUILD)
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.branch.name=$TRAVIS_BRANCH \
- -Dsonar.projectVersion=$INITIAL_VERSION
+ -Dsonar.projectVersion=$INITIAL_VERSION \
+ -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
+ -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
+ -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
+ -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
echo 'Build and analyze internal pull request'
@@ -186,7 +194,11 @@ BUILD)
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.branch.name=$TRAVIS_PULL_REQUEST_BRANCH \
- -Dsonar.branch.target=$TRAVIS_BRANCH
+ -Dsonar.branch.target=$TRAVIS_BRANCH \
+ -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \
+ -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \
+ -Dsonar.analysis.sha1=$TRAVIS_COMMIT \
+ -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
fi
else
echo 'Build feature branch or external pull request'