language: java

jdk:
  - oraclejdk8

sudo: required

services:
  - docker

before_install:
  - docker pull bit3/jsass-test-centos5
  - docker pull bit3/jsass-test-centos6
  - docker pull bit3/jsass-test-centos7
  - docker pull bit3/jsass-test-ubuntu12.04
  - docker pull bit3/jsass-test-ubuntu14.04
  - mkdir -p $HOME/.gradle
  - openssl aes-256-cbc -K $encrypted_7aff20607abf_key -iv $encrypted_7aff20607abf_iv -in gradle-travis.properties.enc -out $HOME/.gradle/gradle.properties -d

install: true

script:
  - ./gradlew check runDockerTests
  - "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == bit3/jsass ]] && [[ $TRAVIS_BRANCH == develop ]] && ./gradlew sonarqube -x test"

language: java

jdk:
  - oraclejdk8

sudo: required

services:
  - docker

before_install:
  - docker pull bit3/jsass-test-centos5
  - docker pull bit3/jsass-test-centos6
  - docker pull bit3/jsass-test-centos7
  - docker pull bit3/jsass-test-ubuntu12.04
  - docker pull bit3/jsass-test-ubuntu14.04
  - mkdir -p $HOME/.gradle
  - openssl aes-256-cbc -K $encrypted_7aff20607abf_key -iv $encrypted_7aff20607abf_iv -in gradle-travis.properties.enc -out $HOME/.gradle/gradle.properties -d

install: true

script:
  - ./gradlew check runDockerTests

after_script:
  - "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == bit3/jsass ]] && [[ $TRAVIS_BRANCH == develop ]] && ./gradlew sonarqube -x test"

Move sonarqube scan into after_script section.
Move sonarqube scan into after_script section.
