rebuild commit
This commit is contained in:
parent
615f708600
commit
5b9be577e7
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -8,24 +8,20 @@ node('Lithium'){
|
|||||||
currentBuild.result = 'ABORTED'
|
currentBuild.result = 'ABORTED'
|
||||||
error('Последний коммит - результат сборки jenkins')
|
error('Последний коммит - результат сборки jenkins')
|
||||||
}
|
}
|
||||||
cmd "git checkout ${env.BRANCH_NAME}"
|
sh "git checkout ${env.BRANCH_NAME}"
|
||||||
cmd "git checkout -- ."
|
sh "git checkout -- ."
|
||||||
cmd "git pull"
|
sh "git pull"
|
||||||
cmd "git submodule update --init --recursive"
|
sh "git submodule update --init --recursive"
|
||||||
cmd "git submodule update --remote --merge"
|
sh "git submodule update --remote --merge"
|
||||||
}
|
}
|
||||||
stage("build and publish"){
|
stage("build and publish"){
|
||||||
sh label: '', script: 'npm i'
|
sh label: '', script: 'npm i'
|
||||||
sh label: '', script: 'npm run build'
|
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() {
|
private boolean lastCommitIsBumpCommit() {
|
||||||
lastCommit = cmd([script: 'git log -1', returnStdout: true])
|
lastCommit = sh([script: 'git log -1', returnStdout: true])
|
||||||
if (lastCommit.contains("Author: jenkins")) {
|
if (lastCommit.contains("Author: jenkins")) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user