From 8b6af5fa2150292888be66509b0ce939ba267469 Mon Sep 17 00:00:00 2001 From: pumpurumer Date: Wed, 28 Sep 2022 14:25:16 +0400 Subject: [PATCH] build commit --- Jenkinsfile | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 320f9ae..2caa9ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,27 +1,21 @@ env.HL_BUILD_MODE = "jenkins" -node('Rubidium'){ +node('Lithium'){ stage('get new version to repo') { - dir('/opt/usersite-build'){ - checkout([$class: 'GitSCM', branches: [[name: '*/fashion-logica']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'jenkins_all', url: 'https://git.hlcompany.ru/git/usersite.git']]]) + checkout scm + 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 project') { - // sh label: '', script: 'systemctl stop lkcrm4retail' - // 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' + stage("build and publish"){ + sh label: '', script: 'npm i' + sh label: '', script: 'npm run build' } - } \ No newline at end of file