Skip to content
Snippets Groups Projects
Commit 6202b403 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5907 upload branch jars to nexus

parent 1afa4333
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,28 @@ pipeline { ...@@ -62,6 +62,28 @@ pipeline {
} }
} }
stage('Set Version') {
when {
not {
anyOf {
branch 'master'
branch 'release'
}
}
}
steps {
script {
FAILED_STAGE=env.STAGE_NAME
JAR_TAG = getPomVersion().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('Maven Build') { stage('Maven Build') {
steps { steps {
script { script {
...@@ -111,6 +133,7 @@ pipeline { ...@@ -111,6 +133,7 @@ pipeline {
} }
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn --no-transfer-progress -s $MAVEN_SETTINGS -DskipTests deploy -Dmaven.wagon.http.retryHandler.count=3' sh 'mvn --no-transfer-progress -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