Skip to content

Instantly share code, notes, and snippets.

@lukespragg
Created April 26, 2014 01:18
Show Gist options
  • Save lukespragg/11309089 to your computer and use it in GitHub Desktop.
Save lukespragg/11309089 to your computer and use it in GitHub Desktop.
Maven and Travis-CI with SonarQube - http://www.sonarqube.org/
# Check if today is Sunday, if commit is not a pull request, if git repo is official, and if branch is master. If checks pass, run Sonar reports
- "[[ $(date +%u) -gt 5 ]] && [[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == RepoOrg/RepoName ]] && [[ $TRAVIS_BRANCH == master ]] && mvn sonar:sonar"
<properties>
<sonar.host.url>http://sonar.mysite.com</sonar.host.url>
<sonar.jdbc.url>jdbc:mysql://sonar.mysite.com:3306/sonar_travis</sonar.jdbc.url>
<sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>
<sonar.jdbc.username>sonar_travis</sonar.jdbc.username>
<sonar.jdbc.password>password_to_db</sonar.jdbc.password>
</properties>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment