[DO-290] fixed creating release branch (!18)

Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/18
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
This commit is contained in:
aleksandr.vodyanov
2024-02-26 21:34:30 +03:00
committed by Aleksandr Vodyanov
parent 8f7b47fe0d
commit 358a1e1f51
2 changed files with 2 additions and 67 deletions

View File

@@ -83,7 +83,8 @@ podTemplate(workspaceVolume: hostPathWorkspaceVolume(hostPath: "/data"),
Gitea tavroRepo = new Gitea(this, apiRepoURL, "${env.JENKINS_GIT_CREDENTIALS_HTTP}")
branch = params.BRANCH_TYPE.toLowerCase() + params.VERSION
if (!params.VERSION.matches(versionPattern)) {
if (!params.VERSION.matches(versionPattern) || \
(params.BRANCH_TYPE == 'Release' && params.VERSION.matches(/^\d+\.\d+\.\d+.*/))) {
println('You must specify correct version, see description!')
error()
}