more global variables

This commit is contained in:
2020-03-04 19:41:58 +03:00
parent 7d73129731
commit 55a346c526
8 changed files with 26 additions and 14 deletions

14
predeploy/Jenkinsfile vendored
View File

@@ -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}/*"
}
}