Files
devops-it-manual/ops/jenkins/Jenkinsfile

28 lines
592 B
Groovy

pipeline {
agent { label 'controller-small-trusted' }
options {
skipDefaultCheckout()
disableConcurrentBuilds()
timeout(time: 5, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '20'))
}
stages {
stage('Checkout') {
steps {
checkout scm
sh 'git rev-parse HEAD && python3 --version'
}
}
stage('Syntax check') {
steps {
sh 'python3 -m py_compile pricing.py tests/test_pricing.py'
}
}
stage('Unit tests') {
steps {
sh 'python3 -m unittest discover -s tests -v'
}
}
}
}