OpenID-Connect-Java-Spring-.../Jenkinsfile

68 lines
1.9 KiB
Plaintext
Raw Normal View History

2018-05-30 11:41:53 +00:00
//
// CTC Auth Jenkins Pipeline
//
pipeline {
agent any
tools {
maven 'Maven 3.3.9'
jdk 'Java 8'
}
options {
// Only keep 10 builds in total
buildDiscarder(logRotator(numToKeepStr:'10', daysToKeepStr:'2'))
// Display timestamps
timestamps()
// Prevent concurrent builds
disableConcurrentBuilds();
}
stages {
stage ('1.3.3 Build') {
when {
branch "1.3.x"
}
steps {
sh "mvn versions:set -DnewVersion=1.3.3.GRESHAM-19"
sh "mvn -N versions:update-child-modules"
timeout(time: 10, unit: 'MINUTES') {
2018-09-26 11:19:01 +00:00
sh "mvn -B -V -U -T4 clean deploy -DaltReleaseDeploymentRepository=releases::default::https://nexus.greshamtech.com/content/repositories/thirdparty/"
}
}
post {
always{
2018-09-26 12:51:28 +00:00
archiveArtifacts caseSensitive: false, onlyIfSuccessful: true, allowEmptyArchive: true, artifacts: 'openid-connect-server-webapp/target/*.war'
}
}
}
2018-05-30 11:41:53 +00:00
stage ('Build') {
when {
not {
branch "1.3.x"
}
}
2018-05-30 11:41:53 +00:00
steps {
sh "mvn versions:set -DnewVersion=${env.BRANCH_NAME}.GRESHAM-SNAPSHOT"
2018-05-30 12:15:38 +00:00
sh "mvn -N versions:update-child-modules"
2018-05-30 11:51:38 +00:00
timeout(time: 10, unit: 'MINUTES') {
2018-05-30 14:24:51 +00:00
sh "mvn -B -V -U -T4 clean deploy -DaltSnapshotDeploymentRepository=snapshots::default::https://nexus.greshamtech.com/content/repositories/third-party-snapshots/"
2018-05-30 11:41:53 +00:00
}
}
post {
always{
archiveArtifacts caseSensitive: false, onlyIfSuccessful: true, allowEmptyArchive: true, artifacts: 'openid-connect-server-webapp/target/*.war'
}
success {
junit '**/target/surefire-reports/**/*.xml'
}
}
}
}
post {
always {
deleteDir()
}
}
}