env:
matrix:
- TARGET=CI
- - TARGET=IT SQ_VERSION=DEV
- - TARGET=IT SQ_VERSION=5.1.2
- - TARGET=IT SQ_VERSION=LTS
+ - TARGET=IT
cache:
directories:
function BuildSnapshot
{
- param ([string]$Project)
+ param ([string]$Project)
- echo "Fetch and build latest green snapshot of [$Project]"
+ echo "Fetch and build snapshot of [$Project]"
- $lastGreenSha1 = (new-object Net.WebClient).DownloadString("http://sonarsource-979.appspot.com/$Project/latestGreen")
-
- Build $Project $lastGreenSha1
+ Build $Project "HEAD"
}
function CheckLastExitCode
}
configureTravis
-regular_mvn_build_deploy_analyze
+case "$TARGET" in
-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
+CI)
+ regular_mvn_build_deploy_analyze
+ ;;
+IT)
+ MIN_SQ_VERSION="LTS"
+ mvn install -DskipTests=true -Dsource.skip=true -Denforcer.skip=true -B -e -V
+
+ 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
+ # all other versions of SQ are tested by the QA pipeline at SonarSource
+ ;;
+
+*)
+ echo "Unexpected TARGET value: $TARGET"
+ exit 1
+ ;;
+
+esac
-# all other versions of SQ are tested by the QA pipeline at SonarSource