Skip to content
Snippets Groups Projects
Commit 1b68f6b7 authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-5907 update jenkinsfile to upload jars from branches'...

Merge pull request 'OZG-5907 update jenkinsfile to upload jars from branches' (#12) from OZG-5907 into master
parents a6220a87 ec03c31b
Branches
Tags 2.12.0
No related merge requests found
......@@ -38,7 +38,25 @@ pipeline {
}
}
}
stage('Set Version') {
when {
not {
anyOf {
branch 'master'
branch 'release'
}
}
}
steps {
script {
FAILED_STAGE=env.STAGE_NAME
JAR_TAG = getPomVersion('pom.xml').replace("SNAPSHOT", "${env.BRANCH_NAME}-SNAPSHOT")
}
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh "mvn -s $MAVEN_SETTINGS versions:set -DnewVersion=${JAR_TAG} -DprocessAllModules=true"
}
}
}
stage('Build Vorgang-Schnittstelle') {
steps {
script {
......@@ -52,18 +70,13 @@ pipeline {
}
stage('Deploy to Nexus'){
when {
anyOf {
branch 'master'
branch 'release'
}
}
steps {
script {
FAILED_STAGE = env.STAGE_NAME
}
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS -DskipTests deploy -Dmaven.wagon.http.retryHandler.count=3'
sh "mvn -s $MAVEN_SETTINGS versions:revert"
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment