Проверка 1001

pull/3/head
yuobrezkov 2025-04-09 15:51:27 +03:00
parent d58a1e8b00
commit 707780e0dc
1 changed files with 5 additions and 3 deletions

8
Jenkinsfile vendored
View File

@ -30,21 +30,23 @@ pipeline {
stage ('Initialize variables') {
steps {
script {
withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) {
lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
if (!lastVersion) {
lastVersion = "0.0.0"
}
sh "echo ${lastVersion}"
echo "Last version: ${lastVersion}"
def (major, minor, patch) = lastVersion.tokenize('.')
def newVersion = "${major}.${minor}.${patch.toInteger() + 1}"
echo "New version: ${newVersion}"
env.IMAGE_TAG = newVersion
env.NEW_VERSION = newVersion
}
}
}
}
stage ('Build docker image') {
when {
expression { env.CHANGE_BRANCH?.startsWith('rc') }