dev #dev #14696 Перенос WPA приложения кофелайка тест на прод: add git pull to Jenkinsfile
This commit is contained in:
parent
97ce3c9e55
commit
ee0792b954
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@ -10,6 +10,7 @@ node('Palladium'){
|
||||
}
|
||||
sh "git checkout ${env.BRANCH_NAME}"
|
||||
|
||||
sh "git pull"
|
||||
}
|
||||
stage("build and publish"){
|
||||
dir('angular'){
|
||||
|
||||
30
Jenkinsfile.~coffee-like-test~
Normal file
30
Jenkinsfile.~coffee-like-test~
Normal file
@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user