popytka ne pytka 2
This commit is contained in:
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -5,6 +5,7 @@ pipeline {
|
|||||||
REGISTRY = 'src.red-soft.ru'
|
REGISTRY = 'src.red-soft.ru'
|
||||||
PRODUCT_NAME = 'sample'
|
PRODUCT_NAME = 'sample'
|
||||||
PRODUCT_GROUP = 'biz.redsoft.sample'
|
PRODUCT_GROUP = 'biz.redsoft.sample'
|
||||||
|
VERSION
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
@ -50,21 +51,6 @@ pipeline {
|
|||||||
|
|
||||||
stage('Build and Push Docker Images') {
|
stage('Build and Push Docker Images') {
|
||||||
steps {
|
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 {
|
script {
|
||||||
withCredentials([usernamePassword(credentialsId: 'build', usernameVariable: 'USER', passwordVariable: 'PASS')]) {
|
withCredentials([usernamePassword(credentialsId: 'build', usernameVariable: 'USER', passwordVariable: 'PASS')]) {
|
||||||
sh '''
|
sh '''
|
||||||
|
|||||||
Reference in New Issue
Block a user