jenkins-scripts/templates/build

40 lines
970 B
Plaintext
Raw Normal View History

2020-03-02 22:47:41 +03:00
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) {
2020-03-04 19:41:58 +03:00
load "${JEN_FILES_TMP_NAME}/${scriptName}/Jenkinsfile"
2020-03-02 22:47:41 +03:00
}
pipeline {
agent any
stages {
stage('processing') {
steps {
clean()
2020-03-04 19:41:58 +03:00
clone(JENKINS_SCRIPTS_URL, JEN_FILES_TMP_NAME)
2020-03-02 22:47:41 +03:00
loadScript('stats')
2020-03-04 19:41:58 +03:00
clone('https://aaprimakov@bitbucket.org/aaprimakov/r-and-m', './')
loadScript('install')
loadScript('build/dev')
loadScript('tests/ts')
loadScript('tests/ui')
2020-03-02 22:47:41 +03:00
loadScript('publish')
2020-03-04 19:41:58 +03:00
loadScript('predeploy')
2020-03-02 22:47:41 +03:00
loadScript('clean-all')
}
}
}
}