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')
|
2021-05-31 09:26:15 +03:00
|
|
|
// clone('https://aaprimakov@bitbucket.org/aaprimakov/r-and-m', './')
|
|
|
|
clone(PROJECT_REPO, './')
|
|
|
|
loadScript('install/no-cy')
|
|
|
|
loadScript('install/no-electron')
|
2020-03-04 19:41:58 +03:00
|
|
|
loadScript('install')
|
2021-05-31 09:26:15 +03:00
|
|
|
loadScript('lint/eslint')
|
|
|
|
loadScript('build/prod')
|
|
|
|
loadScript('tests/unit')
|
|
|
|
|
|
|
|
loadScript('tests/collect_coverage_html')
|
2020-03-04 19:41:58 +03:00
|
|
|
loadScript('predeploy')
|
2021-05-31 09:26:15 +03:00
|
|
|
loadScript('out')
|
2020-03-02 22:47:41 +03:00
|
|
|
loadScript('clean-all')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|