Skip to content

Commit

Permalink
Restrict sonarqube analysis to master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Jun 29, 2016
1 parent 35b942e commit 3a56273
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .travis.yml
Expand Up @@ -3,17 +3,15 @@ jdk:
- oraclejdk8
- oraclejdk7
- openjdk7
before_script:
- sudo keytool -import -alias sonar -keystore $JAVA_HOME/jre/lib/security/cacerts -file sonar_cert.pem -storepass changeit -noprompt
script:
- ./gradlew check sonarqube
- ./gradlew check
deploy:
provider: releases
api_key:
secure: DpTp3xxZrKP21I13G8dYY5EBra5tcf9TsF1y9oLRdOSoVvUe0XaOQ+9WPG2RgnuH1DPVj1n2Rr6emAZ84lSzz4H7T8gPYP4pLjmJBGyriGC7N3MTG2FCBn5l6DgTKNLxtfpek/b7nClif6vVTEse/T8/9an/Yszp9bbIZNNwStE=
file:
- build/distributions/ical4j-$RELEASE_VERSION.zip
- build/distributions/ical4j-$RELEASE_VERSION.tgz
- build/distributions/ical4j-$TRAVIS_TAG.zip
- build/distributions/ical4j-$TRAVIS_TAG.tgz
skip_cleanup: true
on:
tags: true
Expand All @@ -22,3 +20,7 @@ before_deploy: "./gradlew assembleMainDist"
sudo: true
addons:
hostname: travis-ci
after_script:
- sudo keytool -import -alias sonar -keystore $JAVA_HOME/jre/lib/security/cacerts -file sonar_cert.pem -storepass changeit -noprompt
# Check if commit is not a pull request, if git repo is official, and if branch is master. If checks pass, run Sonar reports
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == ical4j/ical4j ]] && [[ $TRAVIS_BRANCH == master ]] && ./gradlew sonarqube"

0 comments on commit 3a56273

Please sign in to comment.