diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..a3ee2752dd --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,40 @@ +pipeline { + agent { + docker { + image 'maven:3-alpine' + args '-v /root/.m2:/root/.m2' + } + } + + stages { + + + stage('Build') { + steps { + sh 'mvn -B -DskipTests clean package' + } + } + + stage("Static Analysis") { + steps { + script { + scannerHome = tool 'SonarQube' + } + withSonarQubeEnv('SonarQube') { + sh "${scannerHome}/bin/sonar-scanner" + } + } + } + + stage('Test') { + steps { + sh 'mvn test' + } + post { + always { + junit 'target/surefire-reports/*.xml' + } + } + } + } +}