popytka ne pytka 2

This commit is contained in:
2026-01-30 20:36:29 +03:00
parent 97acd97acf
commit da819cba07

16
Jenkinsfile vendored
View File

@ -5,6 +5,7 @@ pipeline {
REGISTRY = 'src.red-soft.ru'
PRODUCT_NAME = 'sample'
PRODUCT_GROUP = 'biz.redsoft.sample'
VERSION
}
stages {
@ -50,21 +51,6 @@ pipeline {
stage('Build and Push Docker Images') {
steps {
script {
env.VERSION = sh(
script: '''
set -e
VERSION_FILE=src/main/resources/META-INF/ncore-product/$PRODUCT_GROUP/version.properties
VERSION=$(sed -n 's/^version=//p' "$VERSION_FILE")
if [[ ! "$VERSION" =~ ^[0-9]+(.[0-9]+)*(-[A-Za-z]+)?$ ]]; then
echo "Invalid version format: $VERSION" >&2
exit 1
fi
''',
returnStdout: true
).trim()
}
script {
withCredentials([usernamePassword(credentialsId: 'build', usernameVariable: 'USER', passwordVariable: 'PASS')]) {
sh '''