2019-03-05 15:03:10 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('prepare') {
|
2019-03-05 15:23:41 +01:00
|
|
|
steps {
|
|
|
|
sh 'pipenv install -d'
|
|
|
|
}
|
2019-03-05 15:03:10 +01:00
|
|
|
}
|
|
|
|
stage('code style') {
|
2019-03-05 15:23:41 +01:00
|
|
|
steps {
|
|
|
|
sh 'pipenv run flake8 --max-line-length=120 --exclude=.venv/* .'
|
|
|
|
}
|
2019-03-05 15:03:10 +01:00
|
|
|
}
|
|
|
|
stage('code complexity') {
|
2019-03-05 15:23:41 +01:00
|
|
|
steps {
|
|
|
|
sh 'pipenv run radon cc .'
|
|
|
|
sh 'pipenv run xenon -bB -mA -aA .'
|
|
|
|
}
|
2019-03-05 15:03:10 +01:00
|
|
|
}
|
|
|
|
stage('doc') {
|
2019-03-05 15:23:41 +01:00
|
|
|
steps {
|
|
|
|
dir ('doc') {
|
|
|
|
sh 'pipenv run make html'
|
|
|
|
sh 'pipenv run make man'
|
|
|
|
}
|
|
|
|
archiveArtifacts artifacts: 'doc/man/*', fingerprint: true
|
2019-03-05 15:03:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('build') {
|
2019-03-05 15:27:35 +01:00
|
|
|
steps {
|
2019-03-05 15:27:00 +01:00
|
|
|
sh "pipenv run pex . -r <(pipenv lock -r) -e carom.cli:cli -o dist/carom-client"
|
2019-03-05 15:23:41 +01:00
|
|
|
archiveArtifacts artifacts: 'dist/*', fingerprint: true
|
|
|
|
}
|
2019-03-05 15:03:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|