forked from SonarSource/sonar-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cix.sh
43 lines (42 loc) · 1.27 KB
/
cix.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -euo pipefail
echo "Running $TEST with SQ=$SQ_VERSION"
case "$TEST" in
ci)
# only verify build
mvn verify -B -e -V
exit 0;
;;
ruling)
if [[ $GITHUB_BRANCH == "PULLREQUEST-"* && $SLAVE != "windows" ]] || [[ $GITHUB_BRANCH != "PULLREQUEST-"* && $SLAVE == "windows" ]]
then
#Ruling on linux for MASTER branch only (not PR)
#Ruling on windows for internal PRs only (not MASTER branch)
exit 0;
fi
#fetch submodule containing sources of ruling projects
git submodule update --init --recursive
#ruling requires java 8
export JAVA_HOME=/opt/sonarsource/jvm/java-1.8.0-sun-x64
export PATH=$JAVA_HOME/bin:$PATH
;;
performancing)
#fetch submodule containing sources of performancing projects
git submodule update --init --recursive
;;
plugin)
;;
semantic)
#fetch submodule containing sources of projects used for semantic ITs
git submodule update --init --recursive
#Semantic IT projects requires java 8
export JAVA_HOME=/opt/sonarsource/jvm/java-1.8.0-sun-x64
export PATH=$JAVA_HOME/bin:$PATH
;;
*)
echo "Unexpected TEST mode: $TEST"
exit 1
;;
esac
cd its/$TEST
mvn package -Pit-$TEST -Dsonar.runtimeVersion="$SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false -B -e -V