diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..7787aec --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,41 @@ +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' + publishCoverage adapters: [jacocoAdapter(mergeToOneReport: true, path: '*/target/site/jacoco/jacoco.xml')] + } + } + } + stage('SonarQube Analysis') { + when { + branch 'develop' + } + steps { + withSonarQubeEnv('KSKE SonarQube') { + sh "$SONAR_MAVEN_GOAL" + } + } + } + } + post { + success { + archiveArtifacts artifacts: '*/target/event-bus-*.jar' + } + } +} diff --git a/core/pom.xml b/core/pom.xml index 629523e..e484f03 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,6 +1,4 @@ - + 4.0.0 event-bus-core @@ -26,14 +24,36 @@ - + + org.apache.maven.plugins maven-surefire-plugin 3.0.0-M5 - + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + + prepare-agent + + + + report + test + + report + + + + + + \ No newline at end of file