Fixed Jenkinsfile
All checks were successful
Locusworks Team/commons/pipeline/head This commit looks good
All checks were successful
Locusworks Team/commons/pipeline/head This commit looks good
This commit is contained in:
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@ -108,17 +108,18 @@ def getSha1() {
|
||||
}
|
||||
|
||||
def mvn(args) {
|
||||
// add node and maven tools to path before calling maven
|
||||
def mvnHome = tool name: 'maven-3.6.1'
|
||||
env.PATH = "${mvnHome}/bin:${env.PATH}"
|
||||
sh "mvn ${args}"
|
||||
withMaven(
|
||||
maven: 'maven-3.6.1',
|
||||
globalMavenSettingsConfig: 'locusworks-settings'
|
||||
) {
|
||||
|
||||
sh "mvn ${args}"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
def mvn_initial(args) {
|
||||
// add node and maven tools to path before calling maven
|
||||
def mvnHome = tool name: 'maven-3.6.1'
|
||||
env.PATH = "${mvnHome}/bin:${env.PATH}"
|
||||
sh "mvn ${args}"
|
||||
mvn(args)
|
||||
}
|
||||
|
||||
def set_result(status) {
|
||||
@ -166,9 +167,9 @@ def SetVersion( v ) {
|
||||
version = branch_name_base + "." + build_number + "-RELEASE";
|
||||
//version = branch_name.substring('release/'.length()) + "." + build_number
|
||||
currentBuild.displayName = version
|
||||
} else if (v == 'develop') {
|
||||
} else if (v == 'develop') {
|
||||
version = branch_name_base + "." + build_number + "-SNAPSHOT";
|
||||
currentBuild.displayName = version
|
||||
currentBuild.displayName = version
|
||||
} else {
|
||||
// for all other branches the version number is 0 with an appended build number
|
||||
// and for the display name use the jenkins default #n and add the branch name
|
||||
@ -182,4 +183,4 @@ def SetVersion( v ) {
|
||||
}
|
||||
}
|
||||
|
||||
return this
|
||||
return this
|
Reference in New Issue
Block a user