2016-02-05 16:51:05 +01:00
|
|
|
#!/bin/bash
|
2016-06-06 09:39:54 +02:00
|
|
|
# QA pipeline
|
2016-02-05 16:51:05 +01:00
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
case "$RUN_ACTIVITY" in
|
|
|
|
|
|
|
|
run-db-unit-tests-*)
|
2016-07-26 11:06:10 +02:00
|
|
|
DB_ENGINE=$(sed "s/run-db-unit-tests-//g" <<< $RUN_ACTIVITY)
|
2016-02-05 16:51:05 +01:00
|
|
|
./run-db-unit-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties"
|
|
|
|
;;
|
|
|
|
|
2016-02-17 10:42:55 +01:00
|
|
|
run-db-integration-tests-*)
|
2016-07-26 11:06:10 +02:00
|
|
|
DB_ENGINE=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 1)
|
|
|
|
CATEGORY=$(sed "s/run-db-integration-tests-//g" <<< $RUN_ACTIVITY | cut -d \- -f 2)
|
2017-08-22 17:31:47 +02:00
|
|
|
if [[ "$GITHUB_BRANCH" == "PULLREQUEST-"* ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
./run-integration-tests.sh "${CATEGORY}" "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties"
|
|
|
|
fi
|
2016-02-17 10:42:55 +01:00
|
|
|
;;
|
|
|
|
|
2016-02-10 18:19:40 +01:00
|
|
|
run-it-released-plugins)
|
2016-02-11 10:25:12 +01:00
|
|
|
./run-integration-tests.sh "Plugins" "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties"
|
2016-02-05 16:51:05 +01:00
|
|
|
;;
|
|
|
|
|
|
|
|
run-perf-tests)
|
|
|
|
./run-perf-tests.sh
|
|
|
|
;;
|
|
|
|
|
2016-03-02 17:49:10 +01:00
|
|
|
run-upgrade-tests-*)
|
2016-07-26 11:06:10 +02:00
|
|
|
DB_ENGINE=$(sed "s/run-upgrade-tests-//g" <<< $RUN_ACTIVITY)
|
2017-08-22 17:31:47 +02:00
|
|
|
if [[ "$GITHUB_BRANCH" == "PULLREQUEST-"* ]] && [[ "$DB_ENGINE" != "postgresql93" ]]; then
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
./run-upgrade-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-${DB_ENGINE}.properties"
|
|
|
|
fi
|
2016-03-02 17:49:10 +01:00
|
|
|
;;
|
|
|
|
|
2016-02-05 16:51:05 +01:00
|
|
|
*)
|
|
|
|
echo "unknown RUN_ACTIVITY = $RUN_ACTIVITY"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|