diff --git a/Jenkinsfile b/Jenkinsfile index 880b2ed..3efa81b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,33 +3,24 @@ pipeline { stages { stage('Prepare') { steps { - checkout([ - $class: 'GitSCM', - branches: [[name: '**']], - extensions: [[$class: 'CleanBeforeCheckout']], - userRemoteConfigs: [[credentialsId: 'github-kemitix', url: 'git@github.com:kemitix/conditional.git']] - ]) + git url: 'git@github.com:kemitix/conditional.git', + branch: '**', + credentialsId: 'github-kemitix' } } stage('Build') { steps { - sh './mvnw -B -U clean install' - } - } - stage('Reporting') { - steps { - junit '**/target/surefire-reports/*.xml' - archiveArtifacts '**/target/*.jar' + withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { + sh "mvn -B -U clean install" + } } } stage('Deploy') { - when { - expression { - env.GIT_BRANCH == 'master' - } - } + when { expression { (env.GIT_BRANCH == 'master') } } steps { - sh './mvnw -B -Dskip-Tests=true -P release deploy' + withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { + sh "mvn -B -U -P release deploy" + } } } } diff --git a/pom.xml b/pom.xml index 00dd62e..6040f8c 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 3.8.0 4.3.0 2.10 - 0.5.1 + 0.5.2 1.16.20