diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..e88ea6a --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,37 @@ +pipeline { + agent any + + options { + ansiColor('xterm') + } + + stages { + stage('Build') { + steps { + sh 'mvn -DskipTests clean package' + } + } + stage('Test') { + steps { + sh 'mvn test' + } + post { + always { + junit '*/target/surefire-reports/*.xml' + } + } + } + stage('SonarQube Analysis') { + steps { + withSonarQubeEnv('KSKE SonarQube') { + sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar' + } + } + } + } + post { + success { + archiveArtifacts artifacts: 'client/target/envoy-client-*-shaded.jar, server/target/envoy-server-jar-with-dependencies.jar' + } + } +} diff --git a/common/src/test/java/envoy/data/UserTest.java b/common/src/test/java/envoy/data/UserTest.java index d8e65cd..c52df73 100644 --- a/common/src/test/java/envoy/data/UserTest.java +++ b/common/src/test/java/envoy/data/UserTest.java @@ -18,10 +18,10 @@ import envoy.util.SerializationUtils; * @author Leon Hofmeister * @since Envoy Common v0.1-beta */ -class UserTest { +public class UserTest { @Test - void test() throws IOException, ClassNotFoundException { + public void test() throws IOException, ClassNotFoundException { User user2 = new User(2, "kai"); User user3 = new User(3, "ai"); User user4 = new User(4, "ki", Set.of(user2, user3)); diff --git a/pom.xml b/pom.xml index 760b751..3abcce9 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,13 @@ + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + +