some templates

This commit is contained in:
2020-03-12 23:40:47 +03:00
parent fd231b40fc
commit 3de6f2f855
4 changed files with 30 additions and 0 deletions

39
templates/build Normal file
View File

@@ -0,0 +1,39 @@
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 "${JEN_FILES_TMP_NAME}/${scriptName}/Jenkinsfile"
}
pipeline {
agent any
stages {
stage('processing') {
steps {
clean()
clone(JENKINS_SCRIPTS_URL, JEN_FILES_TMP_NAME)
loadScript('stats')
clone('https://aaprimakov@bitbucket.org/aaprimakov/r-and-m', './')
loadScript('install')
loadScript('build/dev')
loadScript('tests/ts')
loadScript('tests/ui')
loadScript('publish')
loadScript('predeploy')
loadScript('clean-all')
}
}
}
}