run unit test in new stage
@@ -15,7 +15,30 @@ pipeline {
}
}
- stage('QA:Test') {
+ stage('QA:Unit Test') {
+ environment {
+ MAVEN_OPTS = '-server -Xmx6048m -Xms6048m --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED'
+ }
+
+ steps {
+ sh "mvn clean install -Prelease-site,all-modules -Dmaven.test.failure.ignore=true -Djavamelody.storage-directory=/tmp/javamelody-jenkins/ -DforkMode=once '-Dtest=!**.*ITest*' "
+ }
+ post {
+ always {
+ junit '**/target/surefire-reports/*.xml'
+
+ jacoco(
+ execPattern: '**/target/jacoco.exec',
+ classPattern: '**/target/classes',
+ sourcePattern: '**/src/main/java',
+ exclusionPattern: '**/src/test*'
+ )
+
+ }
+ }
+ }
+
+ stage('QA:System Test') {
environment {
MAVEN_OPTS = '-server -Xmx6048m -Xms6048m --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED'
}
