Merge pull request 'Add Jenkinsfile' (#114) from feature/jenkinsfile into develop

Reviewed-on: #114
Reviewed-by: DieGurke <maxi@kske.dev>
Reviewed-by: delvh <leon@kske.dev>
develop
kske 1 year ago
commit c5f4969666
Signed by: KSKE Git
GPG Key ID: 70F2F9206EDC1FCE
  1. 37
      Jenkinsfile
  2. 4
      common/src/test/java/envoy/data/UserTest.java
  3. 7
      pom.xml

37
Jenkinsfile vendored

@ -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'
}
}
}

@ -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));

@ -28,6 +28,13 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
</plugins>
</build>
<modules>