fix predeploy no tag error
This commit is contained in:
parent
9cc5f2734b
commit
3529316fdd
6
predeploy/Jenkinsfile
vendored
6
predeploy/Jenkinsfile
vendored
@ -36,8 +36,6 @@ stage ('predeploy') {
|
|||||||
echo 'checking tag'
|
echo 'checking tag'
|
||||||
script {
|
script {
|
||||||
tag = tagModule.calcTag()
|
tag = tagModule.calcTag()
|
||||||
echo "tag is -> ${tag}"
|
|
||||||
println "tagNoV is -> ${tagModule.getTagNoV()}"
|
|
||||||
def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
|
def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
|
||||||
|
|
||||||
if (tag) {
|
if (tag) {
|
||||||
@ -53,12 +51,12 @@ stage ('predeploy') {
|
|||||||
echo 'tag not found'
|
echo 'tag not found'
|
||||||
addBadge(
|
addBadge(
|
||||||
icon: 'info.gif',
|
icon: 'info.gif',
|
||||||
text: "Сборка в master")
|
text: "Сборка в ${branchName}")
|
||||||
// sh "cd ${TARGET_FOLDER}; echo '${branchName}' > ${DEPLOY_VERSION_VAR}"
|
// sh "cd ${TARGET_FOLDER}; echo '${branchName}' > ${DEPLOY_VERSION_VAR}"
|
||||||
sh "mkdir ${branchName}"
|
sh "mkdir ${branchName}"
|
||||||
sh "mv ${TARGET_FOLDER}/* ${branchName}"
|
sh "mv ${TARGET_FOLDER}/* ${branchName}"
|
||||||
// sh "cd ${TARGET_FOLDER} ; echo 'rm ${DEPLOY_VERSION_VAR}' > ${DEPLOY_VERSION_VAR}"
|
// sh "cd ${TARGET_FOLDER} ; echo 'rm ${DEPLOY_VERSION_VAR}' > ${DEPLOY_VERSION_VAR}"
|
||||||
archiveArtifacts artifacts: "${TARGET_FOLDER}/*/**"
|
archiveArtifacts artifacts: "${branchName}/*/**"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user