more global variables
This commit is contained in:
14
predeploy/Jenkinsfile
vendored
14
predeploy/Jenkinsfile
vendored
@@ -1,18 +1,22 @@
|
||||
stage ('predeploy') {
|
||||
echo 'checking tag'
|
||||
script {
|
||||
if (sh(returnStdout: true, script: "git tag --contains").trim()) {
|
||||
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
||||
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
||||
|
||||
if (tag) {
|
||||
echo 'found tag ' + tag
|
||||
sh "cd dist ; echo 'mkdir ${tag}; mv ./master/* ./${tag}; rm -r -d ./master; rm version.sh' > version.sh"
|
||||
def tagNoV = tag.substring(1)
|
||||
sh "cd ${TARGET_FOLDER} ; echo 'mkdir ${tagNoV}; mv ./master/* ./${tagNoV}; rm -r -d ./master; rm ${DEPLOY_VERSION_SH}' > ${DEPLOY_VERSION_SH}"
|
||||
} else {
|
||||
echo 'tag not found'
|
||||
sh "cd dist ; echo 'rm version.sh' > version.sh"
|
||||
sh "cd ${TARGET_FOLDER} ; echo 'rm ${DEPLOY_VERSION_SH}' > ${DEPLOY_VERSION_SH}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ('archiving') {
|
||||
// Archive the build output artifacts.
|
||||
archiveArtifacts artifacts: 'dist/*'
|
||||
script {
|
||||
archiveArtifacts artifacts: "${TARGET_FOLDER}/*"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user