Skip to content

Commit

Permalink
Issue #711: restore sevntu-checks validation by sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
romani committed Aug 16, 2018
1 parent 1d7df35 commit b586caf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ eclipse-analysis)
mvn -e clean compile exec:exec -Peclipse-compiler
;;

sonarqube)
# token could be generated at https://sonarcloud.io/account/security/
# executon on local: SONAR_TOKEN=xxxxxxxxxx ./.ci/travis.sh sonarqube
if [[ -v TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]];
then
exit 0;
fi
if [[ -z $SONAR_TOKEN ]]; then echo "SONAR_TOKEN is not set"; sleep 5s; exit 1; fi
export MAVEN_OPTS='-Xmx2000m'
cd sevntu-checks
mvn -e clean package sonar:sonar \
-Dsonar.organization=checkstyle \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=$SONAR_TOKEN \
-Dmaven.test.failure.ignore=true \
-Dcheckstyle.skip=true -Dpmd.skip=true
;;

*)
echo "Unexpected argument: $1"
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ matrix:
- DESC="test Issue ref in PR description"
- CMD="./.ci/travis.sh pr-description"

# https://sonarcloud.io (oraclejdk8)
- jdk: oraclejdk8
env:
- DESC="sonarcloud.io"
- CMD="./.ci/travis.sh sonarqube"


script:
- SKIP_FILES1=".github|codeship-*|buddy.yml|appveyor.yml|circleci|distelli-manifest.yml"
Expand Down
2 changes: 1 addition & 1 deletion README.textile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h3. Information "!https://secure.travis-ci.org/sevntu-checkstyle/sevntu.checkstyle.png!":http://travis-ci.org/sevntu-checkstyle/sevntu.checkstyle/builds !https://coveralls.io/repos/sevntu-checkstyle/sevntu.checkstyle/badge.svg?branch=master&service=github(Coverage Status)!:https://coveralls.io/github/sevntu-checkstyle/sevntu.checkstyle?branch=master !https://sonarcloud.io/api/project_badges/measure?project=com.github.sevntu.checkstyle%3Asevntu-checks&metric=sqale_index!:https://sonarqube.com/dashboard?id=com.github.sevntu.checkstyle%3Asevntu-checks
h3. Information "!https://secure.travis-ci.org/sevntu-checkstyle/sevntu.checkstyle.png!":http://travis-ci.org/sevntu-checkstyle/sevntu.checkstyle/builds !https://coveralls.io/repos/sevntu-checkstyle/sevntu.checkstyle/badge.svg?branch=master&service=github(Coverage Status)!:https://coveralls.io/github/sevntu-checkstyle/sevntu.checkstyle?branch=master !https://sonarcloud.io/api/project_badges/measure?project=com.github.sevntu-checkstyle%3Asevntu-checks&metric=sqale_index!:https://sonarcloud.io/dashboard?id=com.github.sevntu-checkstyle%3Asevntu-checks

sevntu-checks: !https://maven-badges.herokuapp.com/maven-central/com.github.sevntu-checkstyle/sevntu-checks/badge.svg!:https://search.maven.org/#search|gav|1|g%3A%22com.github.sevntu-checkstyle%22%20AND%20a%3A%22sevntu-checks%22
sevntu-checkstyle-idea-extension:!https://maven-badges.herokuapp.com/maven-central/com.github.sevntu-checkstyle/sevntu-checkstyle-idea-extension/badge.svg!:https://search.maven.org/#search|gav|1|g%3A%22com.github.sevntu-checkstyle%22%20AND%20a%3A%22sevntu-checkstyle-idea-extension%22
Expand Down

0 comments on commit b586caf

Please sign in to comment.