diff options
Diffstat (limited to 'cix.sh')
-rwxr-xr-x | cix.sh | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -14,12 +14,18 @@ case "$RUN_ACTIVITY" in 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) - if [[ "$GITHUB_BRANCH" == "PULLREQUEST-"* ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then - # execute PR QA only on postgres + 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 exit 0 - elif [[ "$GITHUB_BRANCH" == "dogfood-on-next" ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then - # execute dogfood QA only on postgres + + elif [[ "$GITHUB_BRANCH" == "PULLREQUEST-"* ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then + # restrict QA tests to PostgreSQL on pull requests + exit 0 + + elif [[ "$GITHUB_BRANCH" == "dogfood-on-next" ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then + # restrict QA tests to PostgreSQL on dogfood branch exit 0 + else mvn clean package -B -e -V -f tests/plugins/pom.xml @@ -73,8 +79,10 @@ case "$RUN_ACTIVITY" in run-upgrade-tests-*) DB_ENGINE=$(sed "s/run-upgrade-tests-//g" <<< $RUN_ACTIVITY) - if [[ "$GITHUB_BRANCH" == "PULLREQUEST-"* ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then - exit 0 + 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 |