Compare commits
8 Commits
factory-sa
...
ncore-samp
| Author | SHA1 | Date | |
|---|---|---|---|
| f365f754f7 | |||
| d6940c73e5 | |||
| 6a0c68f5e5 | |||
| a15e698058 | |||
| 1a9690f525 | |||
| 39f222797f | |||
| e67a50b0ea | |||
| 50c37dd6bd |
84
Jenkinsfile
vendored
Normal file
84
Jenkinsfile
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
REGISTRY = 'src.red-soft.biz'
|
||||
PRODUCT_NAME = 'sample'
|
||||
PRODUCT_GROUP = 'biz.redsoft.sample'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage('Extract VERSION') {
|
||||
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
|
||||
|
||||
echo "$VERSION"
|
||||
''',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Make gradlew executable') {
|
||||
steps {
|
||||
sh 'chmod +x ./gradlew'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build with Gradle') {
|
||||
steps {
|
||||
sh './gradlew clean'
|
||||
sh './gradlew nTDC nbackup build copyDist publish dockerFile dockerUD rdbDockerFile'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build and Push Docker Images') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([usernamePassword(credentialsId: 'build', usernameVariable: 'USER', passwordVariable: 'PASS')]) {
|
||||
sh '''
|
||||
echo "$PASS" | docker login --username "$USER" --password-stdin $REGISTRY
|
||||
'''
|
||||
def REPO_NAME = "${env.PRODUCT_GROUP.toLowerCase()}/${env.PRODUCT_NAME.toLowerCase()}"
|
||||
def appImage = "${env.REGISTRY}/${REPO_NAME}:${env.VERSION}"
|
||||
sh "cd build/docker && docker build -t ${appImage} ."
|
||||
sh "docker push ${appImage}"
|
||||
|
||||
def rdbImage = "${env.REGISTRY}/${REPO_NAME}-db:${env.VERSION}"
|
||||
sh "cd build/docker && docker build -t ${rdbImage} ."
|
||||
sh "docker push ${rdbImage}"
|
||||
|
||||
def udbImage = "${env.REGISTRY}/${REPO_NAME}-update-db:${env.VERSION}"
|
||||
sh "cd build/docker && docker build -t ${udbImage} ."
|
||||
sh "docker push ${udbImage}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
echo "Проект ${env.PRODUCT_NAME} успешно собран на версии ${env.VERSION}"
|
||||
}
|
||||
failure {
|
||||
echo "Проект ${env.PRODUCT_NAME} не собрался на версии ${env.VERSION}!"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -14,10 +14,6 @@ java {
|
||||
sourceCompatibility = project.properties.'java.version' ?: 17
|
||||
}
|
||||
|
||||
test {
|
||||
failOnNoDiscoveredTests = false
|
||||
}
|
||||
|
||||
ncore {
|
||||
coreVersion = project.properties.'biz.redsoft.ncore.version'
|
||||
sourceEncoding = 'UTF-8'
|
||||
@ -144,7 +140,7 @@ publishing {
|
||||
}
|
||||
}
|
||||
def suffix = project.findProperty('biz.redsoft.release') ? 'releases' : 'snapshots'
|
||||
url "https://ncore-repo.red-soft.ru/repository/${suffix}"
|
||||
url "https://nexus.red-soft.ru/repository/${suffix}"
|
||||
}
|
||||
}
|
||||
publications {
|
||||
|
||||
BIN
db/ncore.zip
BIN
db/ncore.zip
Binary file not shown.
@ -1,10 +1,7 @@
|
||||
dependencies {
|
||||
implementation("biz.redsoft.ncore:ncore-JDK17:1.10.339.68")
|
||||
updates("biz.redsoft.ncore:ncore-JDK17:1.10.339.68:updates")
|
||||
codemaker("biz.redsoft.ncore:ncore-JDK17:1.10.339.68")
|
||||
implementation("biz.redsoft.ncore:ncore-util-JDK17:1.10.339.68")
|
||||
implementation("biz.redsoft.ncore:ncore-cryptoapisec-JDK17:1.10.339.68")
|
||||
implementation("biz.redsoft.ncore:ncore-jna-JDK17:1.10.339.68")
|
||||
codemaker("biz.redsoft.ncore:ncore-JDK17:1.10.339.68:gen")
|
||||
testImplementation("biz.redsoft.ncore:ncore-JDK17:1.10.339.68:tests")
|
||||
implementation("biz.redsoft.ncore:ncore-JDK17:1.10.339.178")
|
||||
updates("biz.redsoft.ncore:ncore-JDK17:1.10.339.178:updates")
|
||||
codemaker("biz.redsoft.ncore:ncore-JDK17:1.10.339.178")
|
||||
codemaker("biz.redsoft.ncore:ncore-JDK17:1.10.339.178:gen")
|
||||
testImplementation("biz.redsoft.ncore:ncore-JDK17:1.10.339.178:tests")
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
biz.redsoft.ncore.version=1.10.339.68
|
||||
biz.redsoft.ncore.version=1.10.339.178
|
||||
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError
|
||||
org.gradle.daemon=false
|
||||
org.gradle.configureondemand=true
|
||||
pluginVersion=4.0.18
|
||||
biz.redsoft.public.repo=https://ncore-repo.red-soft.ru/repository/public
|
||||
biz.redsoft.private.repo=https://ncore-repo.red-soft.ru/repository/ncorez
|
||||
pluginVersion=3.1.10
|
||||
biz.redsoft.public.repo=https://nexus.red-soft.ru/repository/public
|
||||
biz.redsoft.private.repo=https://nexus.red-soft.ru/repository/ncore
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.6-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"dependencies": [],
|
||||
"register": {}
|
||||
}
|
||||
"dependencies" : [ ],
|
||||
"register" : { }
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context>
|
||||
<Manager pathname="" />
|
||||
<CookieProcessor sameSiteCookies="strict"/>
|
||||
</Context>
|
||||
Reference in New Issue
Block a user