Skip to content
Snippets Groups Projects
Commit 00f9e98c authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6710 [chore] fix Jenkinsfile

parent 2a16a62d
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ pipeline { ...@@ -33,7 +33,7 @@ pipeline {
def rootVersion = getRootPomVersion() def rootVersion = getRootPomVersion()
def zufiManagerServerVersion = getParentPomVersion('zufi-manager-server/pom.xml') def zufiManagerServerVersion = getParentPomVersion('zufi-manager-server/pom.xml')
def zufiManagerPvogVersion = getParentPomVersion('zufi-manager-pvog/pom.xml') def zufiManagerPvogVersion = getParentPomVersion('zufi-manager-pvog/pom.xml')
def zufiManagerInterfaceVersion = getParentPomVersion('zufi-manager-interface/pom.xml') def zufiManagerInterfaceVersion = getPomVersion('zufi-manager-interface/pom.xml')
def zufiManagerModelVersion = getParentPomVersion('zufi-manager-model/pom.xml') def zufiManagerModelVersion = getParentPomVersion('zufi-manager-model/pom.xml')
if (isReleaseBranch()) { if (isReleaseBranch()) {
...@@ -436,8 +436,7 @@ Void performSonarCheck(String module) { ...@@ -436,8 +436,7 @@ Void performSonarCheck(String module) {
} }
String getRootPomVersion() { String getRootPomVersion() {
def rootPom = readMavenPom file: 'pom.xml' return getPomVersion('pom.xml')
return rootPom.version
} }
String getParentPomVersion(String filePath) { String getParentPomVersion(String filePath) {
...@@ -445,6 +444,11 @@ String getParentPomVersion(String filePath) { ...@@ -445,6 +444,11 @@ String getParentPomVersion(String filePath) {
return pom.parent.version return pom.parent.version
} }
String getPomVersion(String pomFile){
def pom = readMavenPom file: pomFile
return pom.version
}
String generateImageTag() { String generateImageTag() {
def imageTag = "${env.BRANCH_NAME}-${getRootPomVersion()}" def imageTag = "${env.BRANCH_NAME}-${getRootPomVersion()}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment