2022-09-01 03:23:10 +00:00
|
|
|
pipeline {
|
|
|
|
|
2022-09-01 03:32:10 +00:00
|
|
|
agent {
|
|
|
|
docker {
|
2022-09-01 04:30:06 +00:00
|
|
|
image 'python:3.10-buster'
|
2022-09-01 03:32:10 +00:00
|
|
|
}
|
|
|
|
}
|
2022-09-01 03:23:10 +00:00
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Setup') {
|
|
|
|
steps {
|
2022-09-01 04:20:41 +00:00
|
|
|
sh 'python -m pip install pipenv --user'
|
2022-09-01 04:12:31 +00:00
|
|
|
sh 'python -m pipenv install'
|
2022-09-01 03:23:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Check') {
|
2022-09-01 04:19:44 +00:00
|
|
|
// Security check.
|
2022-09-01 03:23:10 +00:00
|
|
|
steps {
|
2022-09-01 04:12:31 +00:00
|
|
|
sh 'python -m pipenv run bandit -r .'
|
2022-09-01 03:23:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
cleanWs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|