Skip to content

Commit

Permalink
Fix condition that triggers SonarQube analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilnanivadekar committed Mar 29, 2017
1 parent 96731b5 commit 63d331f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ matrix:
env:
- DESC="unit tests"
- CMD="mvn install --batch-mode --show-version --errors"
- SONAR_COMMAND="sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONARQUBE_TOKEN} -Dsonar.organization=eclipse-collections"

- jdk: oraclejdk8
env:
- DESC="compile jmh-tests and performance-tests"
- CMD="mvn install --projects jmh-tests,performance-tests --also-make --activate-profiles all -DskipTests=true --batch-mode --show-version --errors"

script:
if [[ "$TRAVIS_EVENT_TYPE" == "cron" && "$DESC" == "unit tests" ]];
then mvn install --batch-mode --show-version --errors sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONARQUBE_TOKEN} -Dsonar.organization=eclipse-collections ;
else eval $CMD;
if ["$TRAVIS_EVENT_TYPE" == "cron"]; then
eval $CMD $SONAR_COMMAND;
else
eval $CMD;
fi

cache:
Expand Down

0 comments on commit 63d331f

Please sign in to comment.