- 'server/sonar-web/node_modules'
before_cache:
- - 'find $HOME/.m2/repository -type d -name \*-SNAPSHOT -exec rm -rf {} \;'
- - 'find $HOME/.m2/repository -name maven-metadata-\* -exec rm {} \;'
- - 'find $HOME/.m2/repository -name resolver-status.properties -exec rm {} \;'
# remove all the artifacts (JAR, ZIP) that are installed in local repo because of mvn deploy
- rm -rf $HOME/.m2/repository/org/sonarsource/sonarqube
;;
run-it-released-plugins)
- ./run-integration-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties" "Plugins"
+ ./run-integration-tests.sh "Plugins" "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties"
;;
run-perf-tests)
echo ''
echo ''
-# Parallel executions of maven modules and tests.
-# Half of CPU core are used in to keep other half for OS and other programs.
./stop.sh
-mvn clean install -T0.5C -B -e -DskipTests=true -Pdev $*
+mvn install -B -e -V -DskipTests=true -Dsource.skip=true -Denforcer.skip=true $*
+++ /dev/null
-#!/bin/bash
-set -euo pipefail
-
-ORCHESTRATOR_CONFIG_URL=$1
-CATEGORY=$2
-shift 2
-
-cd it
-mvn verify \
- -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
- -Dwith-db-drivers \
- -Dcategory=$CATEGORY \
- -Dsource.skip=true -B -e -V $*
#!/bin/bash
+# Run integration tests. SonarQube must be already built in order to
+# make the ZIP file available for tests.
+
+# Arguments:
+# 1. the category of tests. Possible values: "Category1", "Category2" ,"Category3", "Category4", "Category5" and "Plugins"
+# 2. the path to Orchestrator properties file. If empty, then default values are used. Example: "file:///Users/me/orchestrator.properties"
+#
+# Examples:
+# ./run-integration-tests.sh "Category1" "file:///Users/me/orchestrator-mysql56.properties"
+# ./run-integration-tests.sh "Category1" ""
+
set -euo pipefail
-ORCHESTRATOR_CONFIG_URL=$1
-CATEGORY=$2
+CATEGORY=$1
+ORCHESTRATOR_CONFIG_URL=$2
shift 2
cd it
mvn verify \
- -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
-Dcategory=$CATEGORY \
+ -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \
-Dsource.skip=true -B -e -V $*
</plugins>
</build>
- <profiles>
- <profile>
- <!-- SonarSource internal use -->
- <id>dbTests</id>
- <activation>
- <property>
- <name>dbTests</name>
- </property>
- </activation>
- <properties>
- <junitGroups>org.sonar.test.DbTests</junitGroups>
- </properties>
- <dependencies>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- </dependency>
- <dependency>
- <!-- this artifact is located in the SonarSource internal repository -->
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc6</artifactId>
- <version>11.2.0.3.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.microsoft.sqljdbc</groupId>
- <artifactId>sqljdbc41</artifactId>
- <version>4.1</version>
- <scope>system</scope>
- <systemPath>${project.basedir}/../../sonar-application/src/main/assembly/lib/jdbc/mssql/sqljdbc41.jar</systemPath>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
-
</project>
IT)
start_xvfb
- mvn install -Pit,dev -DskipTests -Dcategory=$IT_CATEGORY -Dmaven.test.redirectTestOutputToFile=false -B -V -e -Dsource.skip=true
+ ./quick-build.sh
+ ./run-integration-tests.sh "$IT_CATEGORY" ""
;;
*)