build commit

This commit is contained in:
pumpurumer 2022-09-28 14:25:16 +04:00
parent 55486de524
commit 8b6af5fa21

32
Jenkinsfile vendored
View File

@ -1,27 +1,21 @@
env.HL_BUILD_MODE = "jenkins" env.HL_BUILD_MODE = "jenkins"
node('Rubidium'){ node('Lithium'){
stage('get new version to repo') { stage('get new version to repo') {
dir('/opt/usersite-build'){ checkout scm
checkout([$class: 'GitSCM', branches: [[name: '*/fashion-logica']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'jenkins_all', url: 'https://git.hlcompany.ru/git/usersite.git']]]) if (lastCommitIsBumpCommit()) {
currentBuild.result = 'ABORTED'
error('Последний коммит - результат сборки jenkins')
} }
bat "git checkout ${env.BRANCH_NAME}"
bat "git checkout -- ."
bat "git pull"
bat "git submodule update --init --recursive"
bat "git submodule update --remote --merge"
} }
stage("build and publish"){
stage('build project') { sh label: '', script: 'npm i'
// sh label: '', script: 'systemctl stop lkcrm4retail' sh label: '', script: 'npm run build'
// dir('/opt/SynthVisionBox/node'){
// sh label: '', script: 'npm install --only=prod'
// sh label: '', script: 'node db_updater.js'
// }
dir('/opt/usersite-build'){
// sh label: '', script: 'npm i'
// sh label: '', script: 'npm run build'
sh label: '', script: 'ng build'
}
// sh label: '', script: 'systemctl start lkcrm4retail'
} }
} }