This commit is contained in:
2020-03-02 22:47:41 +03:00
parent b72fecbbec
commit 7d73129731
11 changed files with 76 additions and 61 deletions

35
template Normal file
View File

@@ -0,0 +1,35 @@
def clean () {
sh 'rm -rf .[!.]*'
sh 'rm -rf ./*'
sh 'ls -a'
}
def clone (String repoPath, String folder) {
echo 'cloning...'
sh "git clone ${repoPath}.git tmp"
sh "mkdir -p ${folder}"
sh "mv ./tmp/* ./${folder}"
sh "mv ./tmp/.[!.]* ./${folder}"
}
def loadScript (String scriptName) {
load "tmp--jfiles/${scriptName}/Jenkinsfile"
}
pipeline {
agent any
stages {
stage('processing') {
steps {
clean()
clone('https://aaprimakov@bitbucket.org/jsadvance20201/jenkins', 'tmp--jfiles')
loadScript('stats')
clone('https://aaprimakov@bitbucket.org/jsadvance20201/dev-server', './')
loadScript('publish')
loadScript('clean-all')
}
}
}
}