remove "git pull" from Jenkinsfile

This commit is contained in:
nikolay 2023-07-06 12:23:56 +04:00
parent 028c28b385
commit 492a87d310
2 changed files with 1 additions and 33 deletions

4
Jenkinsfile vendored
View File

@ -8,9 +8,7 @@ node('Palladium'){
currentBuild.result = 'ABORTED'
error('Последний коммит - результат сборки jenkins')
}
sh "git checkout ${env.BRANCH_NAME}"
sh "git pull --rebase"
sh "git checkout ${env.BRANCH_NAME}"
}
stage("build and publish"){
dir('angular'){

View File

@ -1,30 +0,0 @@
env.HL_BUILD_MODE = "jenkins"
node('Palladium'){
stage('get new version to repo') {
checkout scm
if (lastCommitIsBumpCommit()) {
currentBuild.result = 'ABORTED'
error('Последний коммит - результат сборки jenkins')
}
//sh "git submodule update --init --recursive"
//sh "git submodule update --remote --merge"
}
stage("build and publish"){
dir('angular'){
sh label: '', script: 'npm i'
sh label: '', script: 'npm run build'
}
}
}
private boolean lastCommitIsBumpCommit() {
lastCommit = sh([script: 'git log -1', returnStdout: true])
if (lastCommit.contains("Author: jenkins")) {
return true
} else {
return false
}
}