Files
jenkinsdeclarativepipelines/011-simple-maven-dev-func-pipeline.groovy
Guillem Hernandez Sola 5aa98cf020 Added new 011 simple maven
2018-09-21 12:57:13 +02:00

48 lines
1.5 KiB
Groovy

pipeline {
agent any
stages {
stage('Checkout'){
steps {
git 'https://bitbucket.org/itnove/simple-maven-spring-boot-example.git'
}
}
stage('Build') {
steps {
sh 'mvn -B -DskipTests clean package'
}
}
stage('Development Test') {
steps {
sh 'mvn -Dgroups=unit,integration test'
}
post {
always {
junit 'target/surefire-reports/*.xml'
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'target/surefire-reports', reportFiles: 'index.html', reportName: 'Development Test', reportTitles: ''])
}
}
}
stage('Deliver') {
steps {
sh './jenkins/scripts/deliver.sh'
}
}
stage('Functional Test') {
steps {
sh 'mvn -Dgroups=functional test'
}
post {
always {
junit 'target/surefire-reports/*.xml'
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'target/surefire-reports', reportFiles: 'index.html', reportName: 'Functional Test', reportTitles: ''])
}
}
}
}
post{
success {
archiveArtifacts artifacts: 'target/hello-*.war', onlyIfSuccessful: true
}
}
}