Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Commit

Permalink
REVERT: commits introducing Travis Sonar plugin (963b018 & 352f8c3)
Browse files Browse the repository at this point in the history
  • Loading branch information
re-schneider committed Jun 27, 2017
1 parent 352f8c3 commit a8be7d7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
26 changes: 11 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# required for sonar (https://docs.travis-ci.com/user/sonarqube/)
language: java

matrix:
Expand All @@ -22,20 +21,16 @@ matrix:
- TEST_SUITE=integration
- SONARQUBE_VERSION=5.6


addons:
sonarcloud:
organization: "default"
token:
secure: "d8D4kV5mCz50taLbYX4agjOHvhBrR532rnjTOLGHUhETzXdVaWSH7bKyeIohSQiixEX09pPNY7/bLRENkDPwI25SG9kmrAKLbuJwhALsT0MreBBj+tkRJJhyPXPFvue09LrQOBLDUnrjCKzk+29WeIW0ScLhKIwaxgtN4lAPmFH5rm0rszkKQT0HCQ0FgS9MZsW8ZeCEg8Jkk7Wzd8JVDbCeVvC0PQD8QVEjgLwIQJRtrK+yXVbuzLeGvWRPxxxFzYkZSkXB9CDVfBqaM3RpBgKQpb81tqfVSwpNwTvwpaY1iuesHwOdlxzRuXzcY+wAp8hiZg/d8TjL2sXjBxuoD6a1C14abkdn72d8h43y5E5lWb5tVTaiepuN8DcNzstesN3HicqIZBxStGAgngmTn23eejSodJl7w/CshxuvUd+B2FxOuohPtsf5BgThr8f7Nvs/djIVgij12ovQBoDquTLWpJxhyYeJNlWSw3KOEIQSlXtrciYKcjpoDL8c81L+/TBk1jsp47AU/mSP4moiwKMYYHHw0mSnnV9yY6SZqWmIYLzxGNBW1UUMWH9vQYHzFO0VRQTzqfbMDoOrX/9CBjX4Z8x1dkHqhK+2jjh+rl5YZTXVUqaIHQ2MC04Iy9hgPpf4gSCFaoPUPDN6wn2Q4FAJj2Q054T3XVzrQPhx43w="
# SONAR_TOKEN as is (/!\ no VAR= /!\)

# Activating comments on PRs
github_token:
secure: "JTVHePzKgN9XuzjeFOMaookAuJ/vlQyKpncsl7tRgaZTBXrzBsvptMfGcwmzzmGSEYdIl5sCXD5BMfcF1yv/gY1rGn+uP3j1uKLs5HrxTUAablLfw3DLRGTT1ZLP1GXjVcfoBxhD6MShbC0Z0vyH81FQqJqzXNBUwzEPtwNdUkM0+wRjFZefIRAH0xol3q96FGYbYTWjbDBajOjRnPtUt1TtI9gqaBJ6LDtGvZtyFAuo4Z/rTErpwdxq2f5Gyb6aiv7q/RcSRxT6+kXWmDUnurO4h/FjowdEnViWvCdzJFl9B9I5B/0WwqfHP4qCmLFzA8PC44ntCvu/f89okZJMdpHTpCJdlUqiGxRzqHS/T/D7z2d4NhMgs1y5htef+DWn8eqHjZ1v/qicpHyIgR+FAmWRNw0CZeuXtvYa+FZF9aBJ0CbV7fz4AGIDDZXWP1FSEo7Q9Qc//IzTBM0xADUX9BI1IxwJXUqjdemCd34ELzeBbJVxXDNLbcjFfs/r9Tp7G4cWhPxqk/FjX+3sEpOzG/4nQKENhRHSzVjvON5XYGOhVD6n/RpAwi2OS+BLkkS2apsGQJFqHHtEzMr6Y4z4V7+e1k1+pKMj44z/d3Em52Oe7Ar5oB78vTh1wGYi05SMsfthbOZHftUlrJxYf5yv5K91z1aRcIXQ3mkSnWhzFJw="

# By default only master...
#branches:
env:
global:
# GITHUB_TOKEN
- secure: "fusy970/nx59HQQQ+kEQNoFtDERp+Pn0MDeEjmi3l6nLW/2y97AyhuwlLC05ggu4P7VCATJyEvBhZcmdv+ofFN1NzxVEbmv6QboPg8JGDvV7GqWNV2AYRGyFe07TQpZo3dgtdlDMlyBS0FGeQb8h5EWp3Z0krkUbq4ewJ8xgZvyhY2GWsMZUODynf5xdqCB5mu6VqyzexoQFYdfUy1Us5Nt87h1jZ0Ua63rnVZN9dRgt9VQNusRdyk/GeG0Rb9xreDlkBd8LQgviiA+M8iTitBAcGgQORKfwIP5tXBjNvLJv1KsSKsWqk2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i/oTrjWYXGvbCImTcxmkp266qSWmoML2PEp6s8="


install:
Expand All @@ -50,3 +45,4 @@ dist: trusty

notifications:
email: false

11 changes: 9 additions & 2 deletions .travis/runSonarQubeAnalysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
#

# This assumes that the 2 following variables are defined:
# - SONAR_HOST_URL => should point to the public URL of the SQ server (e.g. for Nemo: https://nemo.sonarqube.org)
# - SONAR_HOST_URL => should point to the public URL of the SQ server)
# - SONAR_TOKEN => token of a user who has the "Execute Analysis" permission on the SQ server

# We don't want to run X times the same analysis because of the matrix configuration
Expand All @@ -24,7 +24,10 @@ if [ "$TRAVIS_BRANCH" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; th
#
# Analysis is done only on master so that build of branches don't push analyses to the same project and therefore "pollute" the results
echo "Starting analysis by SonarQube..."
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -B -e -V
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -B -e -V \
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.organization=$SONAR_ORGA \
-Dsonar.login=$SONAR_TOKEN

elif [ "${TRAVIS_PULL_REQUEST}" != "false" ] && [ -n "${GITHUB_TOKEN-}" ]; then
# => This will analyse the PR and display found issues as comments in the PR, but it won't push results to the SonarQube server
Expand All @@ -35,7 +38,11 @@ elif [ "${TRAVIS_PULL_REQUEST}" != "false" ] && [ -n "${GITHUB_TOKEN-}" ]; then
# That's why the analysis does not need to be executed if the variable GITHUB_TOKEN is not defined.
echo "Starting Pull Request analysis by SonarQube..."
mvn clean package sonar:sonar -B -e -V \
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.organization=$SONAR_ORGA \
-Dsonar.analysis.mode=preview \
-Dsonar.github.oauth=$GITHUB_TOKEN \
-Dsonar.github.repository=$TRAVIS_REPO_SLUG \
-Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST

Expand Down

0 comments on commit a8be7d7

Please sign in to comment.