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