diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..7a6b24c45 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,52 @@ +pipeline { + + agent { label "build" } + + tools { + maven "M3" + } + + stages { + + stage("prepare") { + steps { + checkout scm + } + } + + stage("build") { + steps { + sh "mvn clean package" + } + post { + always { + archive "target/*.jar" + junit 'target/surefire-reports/*.xml' + stash includes:"target/*.jar", name: "binary" + } + } + } + + stage("tests") { + steps { + parallel ( + "static-analysis" : { + withSonarQubeEnv('sonarqube') { + sh 'mvn sonar:sonar' + } + }, + "performance-tests": { + echo "performance tests" + } + ) + } + } + + stage("deploy") { + steps { + unstash name:"binary" + input "Deploy ?" + } + } + } +}