Browse Source

Move ITs on QA

tags/2.7
Julien HENRY 7 years ago
parent
commit
97df742be5
3 changed files with 15 additions and 30 deletions
  1. 0
    5
      .travis.yml
  2. 12
    0
      run_integration_tests.sh
  3. 3
    25
      travis.sh

+ 0
- 5
.travis.yml View File

@@ -7,11 +7,6 @@ jdk:
install: true
script: ./travis.sh

env:
matrix:
- TARGET=CI
- TARGET=IT

cache:
directories:
- $HOME/.m2/repository

+ 12
- 0
run_integration_tests.sh View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Run integration tests with a given version of SonarQube
# Usage: run_integration_tests.sh "5.2"

set -euo pipefail

# required version of SonarQube
SONARQUBE_VERSION=$1
shift

cd it
mvn verify -Dsonar.runtimeVersion=$SONARQUBE_VERSION -e -B -V -U $*

+ 3
- 25
travis.sh View File

@@ -3,34 +3,12 @@
set -euo pipefail

function configureTravis {
mkdir -p ~/.local
mkdir ~/.local
curl -sSL https://github.com/SonarSource/travis-utils/tarball/v27 | tar zx --strip-components 1 -C ~/.local
source ~/.local/bin/install
source ~/.local/bin/install
}
configureTravis

#build_snapshot SonarSource/sonar-scanner-api

case "$TARGET" in

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
regular_mvn_build_deploy_analyze


Loading…
Cancel
Save