From 4b0e9eac1a1952dc7576c5775548ecefbba583da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Pailloncy?= Date: Mon, 6 Mar 2017 17:10:17 +0100 Subject: [PATCH] Add Jenkinsfile --- Jenkinsfile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Jenkinsfile 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 ?" + } + } + } +}