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
Branches
Tags
No related merge requests found
......@@ -61,6 +61,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') {
steps {
......@@ -111,6 +133,7 @@ pipeline {
}
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 -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