diff options
author | David Rautureau <david.rautureau@sonarsource.com> | 2018-02-08 15:01:19 +0100 |
---|---|---|
committer | David Rautureau <david.rautureau@sonarsource.com> | 2018-03-09 11:33:38 +0100 |
commit | 1a17e4302e4b63de6b4ce7c049441803b9471524 (patch) | |
tree | 031bcfbf302c7909c5b45a7c31f1bbc00a2fce34 /cix.sh | |
parent | 21fbe3697bdb6e66016ef8d0bea49da574e02e7d (diff) | |
download | sonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.tar.gz sonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.zip |
Move To Gradle
Diffstat (limited to 'cix.sh')
-rwxr-xr-x | cix.sh | 68 |
1 files changed, 15 insertions, 53 deletions
@@ -3,16 +3,20 @@ set -euo pipefail +REPOX_ARGS="-Dorchestrator.artifactory.apiKey=$REPOX_API_KEY -Dorchestrator.artifactory.repositories=sonarsource-qa" +TEST_ARGS="-Pcix=true -DbuildNumber=$CI_BUILD_NUMBER $REPOX_ARGS" + case "$RUN_ACTIVITY" in run-db-unit-tests-*) DB_ENGINE=$(sed "s/run-db-unit-tests-//g" <<< $RUN_ACTIVITY) - ./run-db-unit-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" + ./run-db-unit-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" \ + ${TEST_ARGS} ;; run-db-integration-tests-*) DB_ENGINE=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 1) - CATEGORY_GROUP=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 2) + CATEGORY=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 2) if [[ "$GITHUB_BRANCH" != "PULLREQUEST-"* ]] && [[ "$GITHUB_BRANCH" != "master" ]] && [[ "$GITHUB_BRANCH" != "branch-"* ]] && [[ "$GITHUB_BRANCH" != "dogfood-on-next" ]]; then # do not execute QA tests on feature branch outside pull request @@ -27,70 +31,28 @@ case "$RUN_ACTIVITY" in exit 0 else - mvn clean package -B -e -V -f tests/plugins/pom.xml - - case "$CATEGORY_GROUP" in - Category1) - CATEGORY="Category1|authorization|measure|qualityGate|source" - ;; - - Category2) - CATEGORY="issue|test|qualityModel" - ;; - - Category3) - CATEGORY="Category3|component|project" - ;; - - Category4) - CATEGORY="Category4|duplication|user|webhook" - ;; - - Category5) - CATEGORY="Category5" - ;; - - Category6) - CATEGORY="Category6|organization" - ;; - - *) - echo "unknown CATEGORY_GROUP: $CATEGORY_GROUP" - exit 1 - ;; - esac - - mvn verify \ - -f tests/pom.xml \ + ./gradlew --no-daemon --console plain -i \ + :tests:integrationTest \ -Dcategory="$CATEGORY" \ -Dorchestrator.configUrl="http://infra.internal.sonarsource.com/jenkins/orch-$DB_ENGINE.properties" \ - -Pwith-db-drivers \ - -B -e -V + ${TEST_ARGS} fi ;; run-it-released-plugins) - ./run-integration-tests.sh "Plugins" "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties" + ./run-integration-tests.sh "Plugins" "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties" \ + ${TEST_ARGS} ;; run-perf-tests) - if [[ "$GITHUB_BRANCH" == "PULLREQUEST-"* ]]; then - # do not execute Perf tests on feature branch outside pull request - exit 0 - else - ./run-perf-tests.sh - fi + ./run-perf-tests.sh \ + ${TEST_ARGS} ;; run-upgrade-tests-*) DB_ENGINE=$(sed "s/run-upgrade-tests-//g" <<< $RUN_ACTIVITY) - if [[ "$GITHUB_BRANCH" != "master" ]] && [[ "$GITHUB_BRANCH" != "branch-"* ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then - # restrict upgrade tests to PostgreSQL on feature branches and dogfood - exit 0 - - else - ./run-upgrade-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" - fi + ./run-upgrade-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties" \ + ${TEST_ARGS} ;; *) |