summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-02-16 21:26:54 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-02-16 21:28:01 +0100
commit6dcf5f86801005d810d895e881d21b7181e4473e (patch)
tree9907a526c76b7654b361fe4d766442fd1782c9a9
parent32b0ebc87b48fb4ed1aa79758d25268911f5866d (diff)
downloadsonar-scanner-cli-6dcf5f86801005d810d895e881d21b7181e4473e.tar.gz
sonar-scanner-cli-6dcf5f86801005d810d895e881d21b7181e4473e.zip
Fix Travis configuration
-rw-r--r--.travis.yml5
-rw-r--r--it/pom.xml2
-rwxr-xr-xtravis.sh77
3 files changed, 12 insertions, 72 deletions
diff --git a/.travis.yml b/.travis.yml
index 0527f82..b1d977d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,7 +16,10 @@ env:
cache:
directories:
- - '$HOME/.m2/repository'
+ - $HOME/.m2/repository
+ - $HOME/.sonar
notifications:
email: false
+ webhooks:
+ - secure: "KmAKurBY49QiBEePmi2G54NN+i9h5uweiQH32CF0DBKsBB7Coswwp4ULdImYGz0QS/r/xIhA1dOzyq7uQ+tmjQsL0DGoUYXlm6P1KO/oQ8UbLQOxIrNN+tH+QxdzDZwIcpvxFUFiCN8bG8XiXSAyKmHeWVNwYKcsZI6GkacNu307h6FOveKqstGfQJQWUObooMGoaiHhdq7LGd25caWCN2QX+mqnjpwGK1wuY5OLABrU3GJnchJj7DjovjiGmstRCDFf+1Xmq+rJ6Gq2hp9YhNQwYgOIlWGqaNzHt6pdz/Wa/QO92N196FPWg/DAidO5esXJUsu4qCwcMHsatGnyOoMHPsllB7Ob12WCeQJgRk6RifeWzt13mmw0mnnU22ZrtwldZpw3cL5eqT5z0ZxLHuHeNP5wiFVFImKuu/GH6tF1gN8fAerDPfiRDNkYWo6VH31ZqqUOBDWKne2hbe17SGwv0PhKq8nuBpKZreRqRZ/xVSN/UcTgVr065UHHxqon+mbglw8C88aTbUuT05O1V9sMl6D6xObEmbSgLqpIpPtrOCkfDhbld7QeAJGMZuVxs502VNxUxWgd0vlp2a5S3E6WV8B6CvQJeeWUugzPR3q9oVQJYUCj01BmSO7i0wj/L6beGIc4KwEbg19Lxhy5YQHumVRve7vXGEIudLkUIFk="
diff --git a/it/pom.xml b/it/pom.xml
index a1a35cd..a336a74 100644
--- a/it/pom.xml
+++ b/it/pom.xml
@@ -31,7 +31,7 @@
<dependency>
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator</artifactId>
- <version>3.9</version>
+ <version>3.10.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
diff --git a/travis.sh b/travis.sh
index 5f2ca30..a9164a0 100755
--- a/travis.sh
+++ b/travis.sh
@@ -4,81 +4,18 @@ set -euo pipefail
function configureTravis {
mkdir -p ~/.local
- curl -sSL https://github.com/SonarSource/travis-utils/tarball/v23 | tar zx --strip-components 1 -C ~/.local
+ curl -sSL https://github.com/SonarSource/travis-utils/tarball/v27 | tar zx --strip-components 1 -C ~/.local
source ~/.local/bin/install
}
configureTravis
-function strongEcho {
- echo ""
- echo "================ $1 ================="
-}
-
-case "$TARGET" in
-
-CI)
- if [ "${TRAVIS_BRANCH}" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
- strongEcho 'Build, deploy and analyze master'
-
- SONAR_PROJECT_VERSION=`maven_expression "project.version"`
-
- # Do not deploy a SNAPSHOT version but the release version related to this build
- set_maven_build_version $TRAVIS_BUILD_NUMBER
-
- export MAVEN_OPTS="-Xmx1G -Xms128m"
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent deploy sonar:sonar \
- -Pcoverage-per-test,deploy-sonarsource \
- -Dmaven.test.redirectTestOutputToFile=false \
- -Dsonar.host.url=$SONAR_HOST_URL \
- -Dsonar.login=$SONAR_TOKEN \
- -Dsonar.projectVersion=$SONAR_PROJECT_VERSION \
- -B -e -V
-
- elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN-}" ]; then
- strongEcho 'Build and analyze pull request, no deploy'
-
- # No need for Maven phase "install" as the generated JAR file does not need to be installed
- # in Maven local repository. Phase "verify" is enough.
-
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar \
- -Dmaven.test.redirectTestOutputToFile=false \
- -Dsonar.analysis.mode=issues \
- -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
- -Dsonar.github.repository=$TRAVIS_REPO_SLUG \
- -Dsonar.github.oauth=$GITHUB_TOKEN \
- -Dsonar.host.url=$SONAR_HOST_URL \
- -Dsonar.login=$SONAR_TOKEN \
- -B -e -V
-
- else
- strongEcho 'Build, no analysis, no deploy'
-
- # No need for Maven phase "install" as the generated JAR file does not need to be installed
- # in Maven local repository. Phase "verify" is enough.
-
- mvn verify \
- -Dmaven.test.redirectTestOutputToFile=false \
- -B -e -V
- fi
- ;;
+regular_mvn_build_deploy_analyze
-IT)
- if [ "${SQ_VERSION}" = "DEV" ]
- then
- build_snapshot "SonarSource/sonarqube"
- fi
- # Need install because ITs will take artifact from local repo
- mvn install -B -e -V -Dsource.skip=true -Denforcer.skip=true -Danimal.sniffer.skip=true -Dmaven.test.skip=true
-
- cd it
-
- mvn -Dsonar.runtimeVersion="$SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false verify -e -B -V
- ;;
+MIN_SQ_VERSION="LTS"
+echo '======= Run integration tests on minimal supported version of SonarQube ($MIN_SQ_VERSION)'
+cd it
+mvn -Dsonar.runtimeVersion="$MIN_SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false verify -e -B -V
-*)
- echo "Unexpected TARGET value: $TARGET"
- exit 1
- ;;
-esac
+# all other versions of SQ are tested by the QA pipeline at SonarSource