Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (40 sloc) 1.28 KB
properties([
[$class: 'jenkins.model.BuildDiscarderProperty', strategy: [$class: 'LogRotator', numToKeepStr: '25']],
pipelineTriggers([[$class:"SCMTrigger", scmpoll_spec:"H/30 * * * *"], snapshotDependencies()]),
])
pipeline {
agent any
stages {
stage('Build') {
steps {
withMaven(maven: 'M3.5', mavenSettingsConfig: 'fb57b2b9-c2e4-4e05-955e-8688bc067515', mavenLocalRepo: "$WORKSPACE/../../.m2/${env.BRANCH_NAME}") {
sh 'mvn clean install -DskipTests'
}
}
}
stage('Test') {
steps {
withMaven(maven: 'M3.5', mavenSettingsConfig: 'fb57b2b9-c2e4-4e05-955e-8688bc067515', mavenLocalRepo: "$WORKSPACE/../../.m2/${env.BRANCH_NAME}",
options: [openTasksPublisher(disabled: true)]) {
sh 'mvn test'
}
}
post {
always {
step([$class: 'Publisher', reportFilenamePattern: '**/testng-results.xml'])
}
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
withMaven(maven: 'M3.5', mavenSettingsConfig: 'fb57b2b9-c2e4-4e05-955e-8688bc067515', mavenLocalRepo: "$WORKSPACE/../../.m2/${env.BRANCH_NAME}",
options: [openTasksPublisher(disabled: true)]) {
sh 'mvn deploy -DskipTests'
}
}
}
}
}