[DO-200] fixed mistakes (!26)
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/26 Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
This commit is contained in:
committed by
Aleksandr Vodyanov
parent
64ed0dc98e
commit
62c1563fb7
@@ -61,16 +61,16 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"), yaml: g
|
||||
stage('Create branch') {
|
||||
currentBuild.description = "Build from ${params.SOURCE_BRANCH_NAME}"
|
||||
String versionPattern = /^\d+\.\d+.*/
|
||||
Gitea tavroRepo = new Gitea(this, "${apiRepoURL}/BBL/platformng", "${env.JENKINS_GIT_CREDENTIALS_HTTP}")
|
||||
Gitea platformngRepo = new Gitea(this, "${apiRepoURL}/BBL/platformng", "${env.JENKINS_GIT_CREDENTIALS_HTTP}")
|
||||
branch = params.BRANCH_TYPE.toLowerCase() + params.VERSION
|
||||
println "Branch name: ${branch}"
|
||||
|
||||
if (!params.VERSION.matches(versionPattern) {
|
||||
if (!params.VERSION.matches(versionPattern)) {
|
||||
println('You must specify correct version, see description!')
|
||||
error()
|
||||
}
|
||||
|
||||
Boolean result = tavroRepo.createBranch(params.SOURCE_BRANCH_NAME, branch)
|
||||
Boolean result = platformngRepo.createBranch(params.SOURCE_BRANCH_NAME, branch)
|
||||
|
||||
if (!result) {
|
||||
println("Branch doesn't create, maybe ${branch} already exists")
|
||||
|
||||
Reference in New Issue
Block a user