From 5b9be577e76634ebe9572462755bfd2ab6347b81 Mon Sep 17 00:00:00 2001 From: pumpurumer Date: Wed, 28 Sep 2022 14:34:31 +0400 Subject: [PATCH] rebuild commit --- Jenkinsfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0fc020c..6c72135 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,24 +8,20 @@ node('Lithium'){ currentBuild.result = 'ABORTED' error('Последний коммит - результат сборки jenkins') } - cmd "git checkout ${env.BRANCH_NAME}" - cmd "git checkout -- ." - cmd "git pull" - cmd "git submodule update --init --recursive" - cmd "git submodule update --remote --merge" + sh "git checkout ${env.BRANCH_NAME}" + sh "git checkout -- ." + sh "git pull" + sh "git submodule update --init --recursive" + sh "git submodule update --remote --merge" } stage("build and publish"){ sh label: '', script: 'npm i' sh label: '', script: 'npm run build' } } -def cmd(command) { - // при запуске Jenkins не в режиме UTF-8 нужно написать chcp 1251 вместо chcp 65001 - if (isUnix()) { sh "${command}" } else { bat "chcp 65001\n${command}"} -} private boolean lastCommitIsBumpCommit() { - lastCommit = cmd([script: 'git log -1', returnStdout: true]) + lastCommit = sh([script: 'git log -1', returnStdout: true]) if (lastCommit.contains("Author: jenkins")) { return true } else {